It is the best practice to use more configurable version (i.e. endpoint configured from
web.config/app.config
). For EC2 client, you can do it by the following way:var region = RegionEndpoint.GetBySystemName("ap-northeast-1"); var awsEC2Client = new AmazonEC2Client(region);
For others reason, you can specify from here
Resource Link:
- How to set the EndPoint / Region for the C# .NET SDK : EC2Client?
- How to start an Amazon EC2 instance programmatically in .NET
No comments:
Post a Comment