1

I have set up dynamodb docker image with the following command:

$ docker run -p 8000:8000 -v /Users/me/test/:/data/ amazon/dynamodb-local -jar DynamoDBLocal.jar --sharedDb --dbPath /data

I am able to create a table:

$ aws dynamodb create-table --table-name aaa --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST  --endpoint-url http://localhost:8000

I am able to list the tables using aws cli:

aws dynamodb list-tables --endpoint-url http://localhost:8000

But when I use localhost:8000/shell to listTables, I get an empty list. What is the correct way to display the tables on the shell?

ionush
  • 323
  • 2
  • 6
  • 12

3 Answers3

0

turns out I was copying the listTables code from the shell and forgot to remove ExclusiveStartTableName: 'table_name', value from the function

ionush
  • 323
  • 2
  • 6
  • 12
0

I had similar issues but mine is the difference of two regions in my ~/.aws/config

Even dynamodb-local separates regions.

user1455180
  • 511
  • 4
  • 9
0

FWIW, I was having the same issue.. turns out I used two different 'fakeAwsAccessKeyId' values (one in my unit tests, a different one from the command line). Once I looked at the folder I saw the two .db files and realized my error.