Prasad Domala

· 1 min read

AWS Dynamo DB Local

Download, install and run DynamoDB Local, then create and query tables from the AWS CLI and a local Docker image.

Dynamo DB Local download URLs

Commands

# Unzip Dynamo Db package
unzip dynamodb_local_latest.zip

# Start Dynamo DB Local service
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

# List Dynamo DB Local tables
aws dynamodb list-tables --endpoint-url http://localhost:8000 --profile myaws

# Create Dynamo Db Local tables
aws dynamodb create-table --attribute-definitions AttributeName=Username,AttributeType=S --table-name MyDDBLocal --key-schema AttributeName=Username,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 --region ap-southeast-2 --output json --profile myaws-admin --endpoint-url http://localhost:8000

# Run Dynamo DB docker image
docker run -p 8000:8000 amazon/dynamodb-local