DynamoDB

AWS DynamoDB local

to run AWS DynamoDb on your own machine, you can use official Docker container of AWS.

https://hub.docker.com/r/amazon/dynamodb-local/

Docker pull command :

docker pull amazon/dynamodb-local

DynamoDB local is a downloadable version of DynamoDB that enables developers to develop and test applications using a version of DynamoDB running in your own development environment.

Benefits of using DynamoDB local

The new DynamoDB local Docker image enables you to get started with DynamoDB local quickly by using a docker image with all the DynamoDB local dependencies and necessary configuration built in. The new Docker image also enables you to include DynamoDB local in your containerized builds and as part of your continuous integration testing.

Using DynamoDB local does not require an internet connection and DynamoDB local works with your existing DynamoDB API calls. There are no provisioned throughput, data storage, or data transfer costs with DynamoDB local.

Getting Started with DynamoDB on Docker

Simply run docker run -p 8000:8000 amazon/dynamodb-local to execute DynamoDB locally.

You can find a sample application on GitHub demonstrating how to use DynamoDB local for testing.

To learn how to configure DynamoDB local, see the DynamoDB local usage notes in the AWS Docs.

Examples

$ lsof -i :8000 | grep LISTEN
$ docker run -p 8000:8000 amazon/dynamodb-local
$ aws dynamodb list-tables --endpoint-url http://localhost:8000
$ aws dynamodb create-table --table-name orders_table --attribute-definitions AttributeName=orderId,AttributeType=S --key-schema AttributeName=orderId,KeyType=HASH --billing-mode PAY_PER_REQUEST --endpoint-url http://localhost:8000
$ docker ps --filter ancestor=amazon/dynamodb-local
$ docker stop $(docker ps -a -q --filter ancestor=amazon/dynamodb-local)