DynamoDB: Query Count (Guide w/ Code Examples)

Provided by Rafal Wilinski
To query the count of items in a DynamoDB table using the JavaScript SDK, you can use the query operation and set the Select parameter to COUNT.
var params = { TableName: "myTable", Select: "COUNT" }; dynamodb.query(params, function(err, data) { if (err) { console.log("Error", err); } else { console.log("Success", data.Count); } });
Similar Code Examples
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Delete Table
- DynamoDB: Batch Get
- DynamoDB: Query Items
- DynamoDB: Not Begins With
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Attribute Not Null
- DynamoDB: Query Group By
- DynamoDB: Get Unique Values
- DynamoDB: Query Date Range
- DynamoDB: Get By ID
- DynamoDB: Get Random Item
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Query Ends With
- DynamoDB: Get Last Inserted Item
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase