4

I currently have Dynamodb-local running in a Docker container using the amazon/dynamodb-local image.

The container starts up and I can manually create the necessary tables via AWS CLI.

At this point, however, I need to have the tables created when the container initially starts.

I was hoping to get thoughts on the best approach to handle this - I'm thinking I will still need to use the AWS CLI to create the tables.

If I use a dockerfile, it's my understanding I will need to create a image that has the following: - Python (for using PIP to install AWS CLI) - PIP - AWS CLI - DynamoDB Local

I could also create the tables and then create an image of dynamodb-local at that point to use as my base image, but that would require creating a new image every time I had a new table.

Instead I was hoping to build an image when I need to start the db and (using AWS CLI) read JSON files for the necessary tables and create the tables.

Any advice on how others are currently handling this scenario?

Thanks.

2 Answers 2

1

I've extended dynamodb-local with a UI to manage tables:

docker run -p 8000:8000 -p 80:80 -v storage-volume:/storage -d  awspilotcom/dynamodb-ui

check dynamodb-ui docker image and here is a ui demo

it supports cloudformation templates too.

Sign up to request clarification or add additional context in comments.

Comments

0

You could use a docker volume or shared folder for dynamodb-local data folder:

docker run -p 8000:8000 -v my-volume:/dbstore amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb -dbPath /dbstore

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.