0

I have Create an Application in MVC which is currently using AWS Data Server.For it I am using Amazon Simple DB API . My Database Created by the client is allocated at US-EAST-1 but by the code it's accessing the Database US-WEST-2. If I am Creating the Database or Table Pro grammatically by the code like-

   simpleDBClient.CreateDomain(new CreateDomainRequest() { DomainName = "DemoTable"});

it also stores in US-WEST-2 Region.Please let me know how come i retrive the AWS US-EAST-1 Tables. and in the starting I have also choosed the US-EAST-1 at the time of Creation of Project in Visual Studio. Any Help will be Appreciated.

rpmartz
  • 3,759
  • 2
  • 26
  • 36
coolhimanshu
  • 647
  • 2
  • 13
  • 26
  • there will be an attribute called region while u create the connection object check connection object. – naga4ce Feb 25 '14 at 07:14
  • Thanks for the reply but There are not such attribute available called region. – coolhimanshu Feb 25 '14 at 07:17
  • For example in python it would be like this, import boto.sdb >>> conn = boto.sdb.connect_to_region( ... 'us-west-2', ... aws_access_key_id='', ... aws_secret_access_key='') >>> conn SDBConnection:sdb.amazonaws.com – naga4ce Feb 25 '14 at 07:23
  • yes true,but As I have mentioned I am using .Net API.There not any such call Available. – coolhimanshu Feb 25 '14 at 07:29
  • http://docs.aws.amazon.com/sdkfornet/latest/apidocs/Index.html from this link i think u need to check the application config file from where the take the default settings – naga4ce Feb 25 '14 at 07:30
  • http://docs.aws.amazon.com/sdkfornet/latest/apidocs/Index.html check this too – naga4ce Feb 25 '14 at 07:32

1 Answers1

0

Check out this blog post from the .NET team on using regions and the .NET SDK. In essence,if you are using V2 of the SDK you can modify you app.config or web.config to look like this:

<configuration>
   <appSettings>
        <add key="AWSRegion" value="us-east-1"/>
   </appSettings>
</configuration>
Wade Matveyenko
  • 4,290
  • 1
  • 23
  • 27