New creates a new instance of the EC2 client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.


// Create a EC2 client from just a session.
svc := ec2.New(mySession)

// Create a EC2 client with additional configuration
svc := ec2.New(mySession, aws.NewConfig().WithRegion("us-west-2"))