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 KeyConditionExpression
- DynamoDB: Get Last Inserted Item
- DynamoDB: Create if Not Exists
- DynamoDB: Query Date Range
- DynamoDB: Not Begins With
- DynamoDB: Attribute Not Null
- DynamoDB: Query Ends With
- DynamoDB Get in Typescript
- DynamoDB: Get Last 10 Records
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: BatchGetItem
- DynamoDB: Bulk Insert
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Query JSON
Dynobase is a Professional GUI Client for DynamoDB
First 7 days are on us. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase