Thursday, January 24, 2013

AWS DynamoDB Java API Gotcha

If you don't set the end-point, it will default to the US East Virginia region, resulting in an error saying the table can't be found.

The error message you'll get varies. If you have IAM setup to limit access for the user account to this specific DynamoDB table, then you'll get an "AccessDeniedException". Otherwise, you'll get a "ResourceNotFoundException".

If your DynamoDB is configured in the other regions, you'll have to set the End Point after creating the client e.g:

client = new AmazonDynamoDBClient(awsCredentials);
client.setEndpoint("https://dynamodb.ap-southeast-1.amazonaws.com");

No comments:

Post a Comment