Amazon DynamoDB
Developer Guide (API Version 2012-08-10)

Setting Up DynamoDB Local (Downloadable Version)

The downloadable version of DynamoDB lets you write applications without accessing the actual Amazon DynamoDB web service. Instead, the database is self-contained on your computer.

This local version of DynamoDB can help you save on provisioned throughput, data storage, and data transfer fees. In addition, you do not need to have an Internet connection while you are developing your application. When you are ready to deploy your application in production, you can make some minor changes to your code so that it uses the Amazon DynamoDB web service.

Downloading and Running DynamoDB

The downloadable version of DynamoDB is provided as an executable .jar file. It will run on Windows, Linux, Mac OS X, and other platforms that support Java. Follow these steps to download and run DynamoDB on your computer:

  1. Download DynamoDB for free using one of these links:

    Region Download Links Checksums

    Asia Pacific (Mumbai) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    Asia Pacific (Singapore) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    Asia Pacific (Tokyo) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    EU (Frankfurt) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    South America (São Paulo) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    US West (Oregon) Region

    .tar.gz | .zip

    .tar.gz.sha256 | .zip.sha256

    DynamoDB is also available on Maven or as part of the AWS Toolkit for Eclipse. For more information, see DynamoDB Local (Downloadable Version) and Maven and AWS Toolkit For Eclipse, respectively.


    DynamoDB on your computer requires the Java Runtime Environment (JRE) version 6.x or newer; it will not run on older JRE versions.

  2. After you have downloaded the archive, extract the contents and copy the extracted directory to a location of your choice.

  3. To start DynamoDB on your computer, 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

    You will see occasional diagnostic messages in the window where DynamoDB is running.

    DynamoDB will process incoming requests until you stop it. To stop DynamoDB, type Ctrl+C in the command prompt window.

DynamoDB Local (Downloadable Version) and Maven

To use DynamoDB in your application as a dependency:

  1. Download and install Maven. For more information, see Downloading Apache Maven and Installing Apache Maven.

  2. Add the DynamoDB Maven repository to your application's POM file:

    <!--Dependency:--> <dependencies> <dependency> <groupId>com.amazonaws</groupId> <artifactId>DynamoDBLocal</artifactId> <version>[1.11,2.0)</version> </dependency> </dependencies> <!--Custom repository:--> <repositories> <repository> <id>dynamodb-local-oregon</id> <name>DynamoDB Local Release Repository</name> <url></url> </repository> </repositories>


    Alternatively, use one of the following repository URLs depending on your region:

    id Repository URL






The aws-dynamodb-examples repository in GitHub has some examples for starting and stopping DynamoDB Local inside a Java program and using DynamoDB Local in JUnit tests.

Command Line Options

DynamoDB running on your computer accepts the following command line options:

  • -cors value — Enable CORS support (cross-origin resource sharing) for JavaScript. You must provide a comma-separated "allow" list of specific domains. The default setting for -cors is an asterisk (*), which allows public access.

  • -dbPath value — The directory where DynamoDB will write its database file. If you do not specify this option, the file will be written to the current directory. Note that you cannot specify both -dbPath and -inMemory at once.

  • -delayTransientStatuses — Causes DynamoDB to introduce delays for certain operations. DynamoDB can perform some tasks almost instantaneously, such as create/update/delete operations on tables and indexes; however, the actual DynamoDB service requires more time for these tasks. Setting this parameter helps DynamoDB simulate the behavior of the Amazon DynamoDB web service more closely. (Currently, this parameter introduces delays only for global secondary indexes that are in either CREATING or DELETING status.)

  • -help — Prints a usage summary and options.

  • -inMemory — DynamoDB; will run in memory, instead of using a database file. When you stop DynamoDB;, none of the data will be saved. Note that you cannot specify both -dbPath and -inMemory at once.

  • -optimizeDbBeforeStartup — Optimizes the underlying database tables before starting up DynamoDB on your computer. You must also specify -dbPath when you use this parameter.

  • -port value — The port number that DynamoDB will use to communicate with your application. If you do not specify this option, the default port is 8000.


    DynamoDB uses port 8000 by default. If port 8000 is unavailable, this command will throw an exception. You can use the -port option 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

  • -sharedDb — DynamoDB will use a single database file, instead of using separate files for each credential and region. If you specify -sharedDb, all DynamoDB clients will interact with the same set of tables regardless of their region and credential configuration.