Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"aws dynamodb list-tables" not showing the tables present

When I use:

aws dynamodb list-tables 

I am getting:

{
    "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.

like image 949
Sumanth Shetty Avatar asked Jul 30 '19 06:07

Sumanth Shetty


1 Answers

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:

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.

like image 156
John Rotenstein Avatar answered Sep 28 '22 11:09

John Rotenstein