Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created February 20, 2021 00:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/275756d1e6c69f8e47af45c31184ab84 to your computer and use it in GitHub Desktop.
Save kevinhooke/275756d1e6c69f8e47af45c31184ab84 to your computer and use it in GitHub Desktop.
Local DynamoDB in Docker with DynamoDB Workbench (tables not visible)
If you start the local DynamoDB Docker instance without the -shareDb option, tables are not visible either to
the 'aws dynamodb' cli or DynamodDB Workbench:
docker run -d -p 8000:8000 amazon/dynamodb-local
If you start with the -shareDb option needed to see the tables, the container ends immediately.
Per answer on this question https://stackoverflow.com/questions/63835658/can-not-find-table-using-nosql-workbench-for-dynamodb-when-connecting-to-dynamod
start with -shareDb and all other default options:
docker run -d -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb -dbPath .
... this works as expected
Per AWS docs here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html
not passing the -shareDb option results in a db being created with the name of your AWS Access Key. This means if you have a
different key configured for aws cli and DynamoDB Workbench, you're creating different DBs and unable to see them
across different tools
@francosalcedo
Copy link

Very thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment