DEV Community

Mamta Leel
Mamta Leel

Posted on

DynamoDB Part-01- πŸš€ Guide to Running DynamoDB Locally

Hey Dev Community! πŸ‘‹
To install dynamoDB locally follow the below steps.

πŸ› οΈ Step 1: Download DynamoDB
Get DynamoDB Local for free from the official sources:

πŸ–₯️ Mac/Linux β†’ Download tar.gz
πŸ–₯️ Windows β†’ Download .zip

πŸ”§ Step 2: Install AWS CLI
To easily view tables and data in a GUI, install the AWS CLI.
here

πŸ“‚ Step 3: Extract and Run DynamoDB
1️⃣ Extract the downloaded .zip file.
2️⃣ Navigate to the directory containing DynamoDBLocal.jar.
3️⃣ Run the following command:
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -dbPath C:/dynamodb/data

πŸ’‘ Important: Ensure that the dynamodb/data directory exists in the C:/ drive. If not, create it using:
mkdir C:/dynamodb/data

πŸ”‘ Step 4: Configure AWS Credentials for Local Use
Set up AWS credentials for local development using:
aws configure

πŸ“‹ Step 5: Verify Tables
To check the available tables, run:
aws dynamodb list-tables --endpoint-url http://localhost:8000

πŸŽ‰ Your DynamoDB is running locally and now add a backend service and hit queries. or you can use terminal too to test it.
Your DynamoDB is running port by default on 8000, you can change with -port [port you want to keep]. and then check the data.

In the next part, we’ll explore how to integrate DynamoDB with a Spring Boot application! πŸš€

Top comments (0)