The AWS SDK for Java provides APIs for the DynamoDB item and table operations. The SDK allows you to choose from among three different APIs:
The AWS SDK for Java Document API provides an intuitive interface for DynamoDB operations. With this API, you work with Tables, Items, Attributes, and other objects that closely resemble their counterparts in the database. The Document API also provides utilities for working with document data types, such as Lists and Maps. Finally, the document API makes it easy to store and retrieve JSON documents in DynamoDB.
The following sections describe the document API and also provide working samples:
The Document API resides in the com.amazonaws.services.dynamodbv2.document namespace.
The high-level API uses object persistence programming techniques to map Java objects to DynamoDB
tables and attributes. In this API, the
The high-level API resides in the com.amazonaws.services.dynamodbv2.datamodeling namespace.
The methods in the low-level API correspond closely to the underlying DynamoDB API. The low-level API allows you to perform the same operations that you can perform using DynamoDB operations such as create, update, and delete tables, and create, read, update, and delete items.
The low-level API resides in the com.amazonaws.services.dynamodbv2.model namespace.
These APIs provide thread-safe clients for accessing DynamoDB. As a best practice, your applications should create one client and reuse the client between threads.
For more information about the AWS SDK for Java API, go to the AWS SDK for Java API Reference.
Choosing a JVM
For the best performance of your server-based applications with the AWS SDK for Java, we recommend that you use the 64-bit version of the
Java Virtual Machine (JVM). This JVM runs only in Server mode, even if you specify the
-Client option at run time. Using the
32-bit version of the JVM with the
-Server option at run time should provide comparable performance to the 64-bit JVM.