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: Attribute Not Null
- DynamoDB: Batch Get
- DynamoDB: Increment Counter
- DynamoDB: Like
- DynamoDB: Get Last Inserted Item
- DynamoDB: Query Items
- DynamoDB: Get Multiple Items
- DynamoDB: Get Table
- DynamoDB: BatchGetItem
- DynamoDB: Query Greater Than
- DynamoDB: GetItem
- DynamoDB: Delete Table
- DynamoDB: Create if Not Exists
- DynamoDB: Not Begins With
- DynamoDB BatchWriteItem in Typescript
Tired of AWS Console? Try Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase