Reputation: 677
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.
Upvotes: 10
Views: 12471
Reputation: 1
Check the region you set up in AWS configuration vs what is displayed at the top of the AWS console. I had my app configured to us-east-2
but the AWS console had us-east-1
as the default. I was able to view my table once the correct region was selected in the AWS console.
Upvotes: 0
Reputation: 677
We need to specify the endpoint in the command which will work . As the above dynamodb is used programmatically and used as wed app.
this command will work :
aws dynamodb list-tables --endpoint-url http://localhost:8080 --region us-west-2
Upvotes: 1
Reputation: 270224
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.
Upvotes: 13