Pergunta

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.

Foi útil?

Solução

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.

Outras dicas

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());
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top