DynamoDB: Query Items (Guide w/ Code Examples)

Provided by Rafal Wilinski
You can use the query
operation to query items using the AWS JavaScript SDK. It takes in several parameters, including the table name, an object that defines the query, and a callback function to handle the query results.
Here is an example of how to query items from a DynamoDB table called myTable
where the id
attribute is equal to a specific value:
var AWS = require('aws-sdk'); var dynamoDb = new AWS.DynamoDB.DocumentClient(); var params = { TableName: "myTable", KeyConditionExpression: "id = :idValue", ExpressionAttributeValues: { ":idValue": "someIdValue" } }; dynamoDb.query(params, function(err, data) { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Query Count
- DynamoDB: Increment Counter
- DynamoDB: Get Multiple Items
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Bulk Insert
- DynamoDB: Like
- DynamoDB: Query Group By
- DynamoDB: Create if Not Exists
- DynamoDB: GetItem
- DynamoDB: Query JSON
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Query KeyConditionExpression
- DynamoDB: BatchGetItem
- DynamoDB: Query Ends With
- DynamoDB: Batch Get
Dynobase is a Professional GUI Client for DynamoDB
Try 7-day free trial. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase