I have about 50 tables in DynamoDB and I’m looking for a way to find size of all tables.
aws dynamodb describe-table --table-name [table name]
I know above command returns TableSizeBytes, but is this the only way to get size of table?
Do I have to run this command for all tables in picture?
Also, what is the cost of running this command?
2
Answers
DescribeTable
API is free to invoke on DynamoDB. Your only way is to iterate through all the tables and sum up the values, but I don’t get why that might be an issue.If you don’t want to list all tables by hand, here’s a one liner, just for fun:
Just write a script and loop over all your tables. As already stated there’s no cost for running the command.
For example: