Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java code samples illustrating usage of amazon dynamo db [closed]

Are you aware of java code samples illustrating usage of Amazon Dynamo DB? If there are any recommended best practices, that would also be very helpful to me.

like image 374
Arvind Avatar asked Feb 19 '12 00:02

Arvind


2 Answers

The AWS SDK for Java has a very simple example for DynamoDB that I used as a jumping off point (direct SDK download link) - the source is available via GitHub as well, see /samples/AmazonDynamoDB/AmazonDynamoDBSample.java.

like image 143
Nick Avatar answered Oct 06 '22 01:10

Nick


Check also jcabi-dynamo, which is an object layer on top of AWS DynamoDB Java SDK, for example:

Region region = new Region.Simple(credentials);
Table table = region.table("my-table");
Collection<Item> items = table.frame().where("name", "Jeff");
for (Item item : items) {
  System.out.println(item.get("salary").getS());
}
like image 35
yegor256 Avatar answered Oct 06 '22 00:10

yegor256