Set scope when creating Amazon SQS in C #

I am very new to the world of cloud computing (including Amazon Web Service), so I have a very simple question:

  • How to set up the Amazon area when I create it? The default area is US-West (Northern California).

Thank!

+5
source share
2 answers

There's a better way to do it now, which uses the Amazon.RegionEndpoint class instead of using the url string. Visual Studio intellisense will provide you with all regions.

AmazonSQS sqs = AWSClientFactory.CreateAmazonSQSClient(RegionEndpoint.USWest2);

In addition, you do not need to pass the appConfig ["AWSAccessKey"] parameter in the parameters if it is defined in app.config. He will find him.

+4
source

:

AmazonSQS sqs = AWSClientFactory.CreateAmazonSQSClient(
            appConfig["AWSAccessKey"],
            appConfig["AWSSecretKey"],
            new AmazonSQSConfig().WithServiceURL("The url for wanted region")
            );

URL-:

: http://aws.amazon.com/sqs/faqs/#What_is_the_EU_End-Point

+3

All Articles