DynamoDB: Batch Get (Guide w/ Code Examples)

Provided by Rafal Wilinski
DynamoDB DocumentClient provides a function named batchGet
to retrieve multiple items at once. Behind the scenes, it calls BatchGetItem
function and can retrieve items in batches of 100 or fewer records.
const AWS = require('aws-sdk'); const dynamo = new AWS.DynamoDB.DocumentClient(); const params = { RequestItems: { "TableName": [ { "Keys": [ { "key1": "value1" }, { "key2": "value2" }, //... ], "ProjectionExpression": "attribute_name1, attribute_name2" } ] } }; dynamo.batchGet(params, function(err, data) { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Get Table
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: BatchGetItem
- DynamoDB: Get Unique Values
- DynamoDB: Attribute Not Null
- DynamoDB: Create if Not Exists
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Like
- DynamoDB: Delete Table
- DynamoDB: Get All Items
- DynamoDB: Get Multiple Items
- DynamoDB: Get Query
- DynamoDB: GetItem
- DynamoDB: Increment Counter
- DynamoDB: Get Last 10 Records
Login to the AWS Console less. Use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase