Reputation: 1607
In MySQL total number of rows found using "select count(*) from TABLENAME".
Similarly, how to get total number of rows in dynamodb table. using metrics is possible to know total number of rows.
Upvotes: 1
Views: 7612
Reputation: 23783
If you don't mind a count that's roughly 6 hours behind, then Stu's answer works. IIRC, it's available programmatically also.
But if you want real-time counts, re-think your need for them ;)
If you really, really, need them, configure a DDB stream to a lambda that will update another DDB table (or a row in the table in question) with the record count and any other aggregate info you want to track. A GSI is often useful here as discussed in Using Global Secondary Indexes for Materialized Aggregation Queries
Upvotes: 0
Reputation: 14799
If you just want to know the count, and don't need the number programmatically, go into the DynamoDB console, click on the table, and it will show you the item count
Upvotes: 3