Tutorial: Basic DynamoDB Operations
In this tutorial, you learn the basics of DynamoDB operations. You do this using the downloadable version of DynamoDB, running on your computer.
In this tutorial you create a table called
Music and perform various
operations on it, including add items, modify items, and read items. This exercise provides
When you complete this tutorial, you will have gained hands-on experience with most of the DynamoDB API operations.
Download and Run DynamoDB
DynamoDB is available as an executable
.jar file. It runs on
Windows, Linux, Mac OS X, and other platforms that support Java. Follow these steps to download and run DynamoDB on your computer.
Download DynamoDB for free using one of these links:
The downloadable version of DynamoDB may be available in repositories such as Homebrew, yum and APT, but it is not guaranteed to be the latest version. To make sure you have the latest version, use one of the links shown above.
DynamoDB supports the Java Runtime Engine (JRE) version 6.x or newer; it does not run on older JRE versions.
After you have downloaded the archive to your computer, extract the contents and copy the extracted directory to a location of your choice.
To start DynamoDB, open a command prompt window, navigate to the directory where you extracted
DynamoDBLocal.jar, and enter the following command:
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
DynamoDB uses port 8000 by default. If port 8000 is unavailable, this command throws an exception. You can use the
-portoption to specify a different port number. For a complete list of DynamoDB runtime options, including
-port, type this command:
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -help
If you need to stop DynamoDB, you can do so by pressing
Open a web browser on your computer and go to the following URL: http://localhost:8000/shell