AWS SDK for .NET
Developer Guide (Version v1.0.0)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Create an EC2 Client

The first step in setting up an Amazon EC2 instance is to create an Amazon EC2 client, which represents a set of EC2 instances and is used to configure, start, and terminate them. The client is represented by an AmazonEC2Client object, which you create as follows:

var ec2Client = new AmazonEC2Client(RegionEndpoint.USWest2);

To specify the service endpoint, pass the appropriate RegionEndpoint value to the constructor. If you omit the endpoint, the instance is created in the default region. For a list of Amazon EC2 service endpoints, see Regions and Endpoints.

Next: Specify an EC2 Security Group