Question:
When I use:
1 2 |
aws dynamodb list-tables |
I am getting:
1 2 3 4 |
{ "TableNames": [] } |
I gave the region as default as I did the same while aws configure
.
I also tried with specific region name.
When I check in AWS console also I don’t see any DynamoDB tables, but i am able to access the table programmatically. Able to add and modify item as well.
But no result when enter I use aws dynamodb list-tables
and also no tables when I check in console.
Answer:
This is clearly a result of the commands looking in the wrong place.
DynamoDB tables are stored in an account within a region. So, if there is definitely a table but none are showing, then the credentials being used either belong to a different AWS Account or the command is being sent to the wrong region.
You can specify a region like this:
1 2 |
aws dynamodb list-tables --region ap-southeast-2 |
If you are able to access the table dynamically, the make sure the same credentials being used by your program are also being used for the AWS CLI.