Menu
Amazon DynamoDB
Getting Started Guide (API Version 2012-08-10)

Java and DynamoDB

In this tutorial, you use the AWS SDK for Java to write simple programs to perform the following Amazon DynamoDB operations:

  • Create a table called Movies and load sample data in JSON format.

  • Perform create, read, update, and delete operations on the table.

  • Run simple queries.

The SDK for Java offers several programming models for different use cases. In this exercise, the Java code uses the document model that provides a level of abstraction that makes it easier for you to work with JSON documents.

You use the downloadable version of DynamoDB in this tutorial. In the Summary, we explain how to run the same code against the DynamoDB web service.

Cost: Free

Prerequisites

  • Read Introduction to DynamoDB Concepts.

  • Download and run DynamoDB on your computer. For more information, see Download and Run DynamoDB. DynamoDB (Downloadable Version) is also available as part of the AWS Toolkit for Eclipse. For more information, see AWS Toolkit For Eclipse.

  • Sign up for Amazon Web Services and create access keys. You need these credentials to use AWS SDKs. To create an AWS account, go to https://aws.amazon.com/, choose Create an AWS Account, and then follow the online instructions.

  • Setup the AWS SDK for Java:

    • Install a Java development environment. If you are using Eclipse IDE, install the AWS Toolkit for Eclipse.

    • Install the AWS SDK for Java.

    • Setup your AWS security credentials for use with the SDK for Java.

    For instructions, see Getting Started in the AWS SDK for Java Developer Guide.

Tip

As you work through this tutorial, you can refer to the AWS SDK for Java API Reference.