0

I need to make an application in java which would be able to access the domains in simpledb. I have created the account and generated access keys. the tools - sdb explorer, scratchpad, and the sdb tool for firefox are not working. how should I start.

Ronn Wilder
  • 1,228
  • 9
  • 13

1 Answers1

0

You need to specify the correct region and endpoint to which your domain belongs. Amazon SimpleDB supports 8 region end points.

Here is the link : http://docs.aws.amazon.com/general/latest/gr/rande.html#sdb_region

Here is sample code:

AmazonSimpleDBConfig theConfig = new AmazonSimpleDBConfig();
theConfig.ServiceURL = myEndpoint;  //where myEndPoint is the region endpoint you are interested in
AmazonSimpleDBClient simpleDbClient= new AmazonSimpleDBClient(myKey, mySecretKey, theConfig);
String selectExpression = "select * from LogTable";
SelectRequest selectRequestAction = new SelectRequest();
selectRequestAction.SelectExpression = selectExpression;
selectRequestAction.NextToken = null;
SelectResponse selectResponse = simpleDbClient.Select(selectRequestAction);
SelectResult selectResult = selectResponse.SelectResult;
List<Item> itemList = selectResult.Item;

The same thing is applicable to your third party tool. If you are using SDB Explorer then after successfully logged-in you should see the list of regions and endpoints at left-hand side corner. You should explore the correct region end point in which you can find your created domain.

Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88