Installation of DynamoDB locally on Your Windows Machine

Amazon DynamoDB is available for download as a.jar file that runs on Windows, Linux Mac OS, and other platforms that support Java. 

Before downloading and running DynamoDB locally, you need to install Java Runtime Environment if you don’t have it on your system.

Installation of Java Runtime Environment 

Download the latest version of JRE from the following link

https://www.java.com/en/download/manual.jsp

In my case, I downloaded Windows Offline (64-bit) version.

Open downloaded .exe file and select install.

If you didn’t change the default path of the installation, it would be C:\Program Files\Java

After installing Java, you need to set the JRE_HOME variable.Based on your operating system, follow one of the steps below

Windows 7 – Right-click My Computer and select Properties > Advanced

Windows 8 – Go to Control Panel > System > Advanced System Settings

Windows 10 – Search for Environment Variables, then select Edit the system environment variables

Click the Environment Variables button->Under System Variables, click New.

In the Variable Name field, enter JRE_HOME

 

In the Variable Value field, enter your JRE installation path. In my case, it was 

C:\Program Files\Java\jre1.8.0_291

To make sure that JRE is installed in your system, go to command prompt and type java -version, and press enter.

You will get the version of the JRE environment if Java Runtime Environment is successfully installed. 

 

Installation of DynamoDB

 

You can download the latest version of DynamoDB from the following link

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html

 Download  .ZIP version from there.

Extract the contents and copy the extracted directory to a location of your choice.

To run DynamoDB on your PC, take command prompt and navigate to the location where DynamoDBLocal.jar was extracted and type the following command.

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

DynamoDB uses port 8000 by default. If port 8000 is unavailable, the above command throws an exception.  The AWS SDKs and tools use endpoints for the Amazon DynamoDB web service. To use the SDKs and tools with the downloadable version of DynamoDB, you must specify the local endpoint: 

http://localhost:8000

The downloaded version of DynamoDB cannot be used as default endpoint by the AWS CLI. As a result, you must specify --endpoint-url with each command. For example, use the following command to list DynamoDB tables.
aws dynamodb list-tables --endpoint-url http://localhost:8000

Search