dynobase-icon
Dynobase

DynamoDB: Batch Get (Guide w/ Code Examples)

Rafal Wilinski

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); } });

Spend less time in the AWS console, use Dynobase.

Try 7-day free trial. No strings attached.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
/
Affiliates & Influencers
© 2024 Dynobase
+
Login to the AWS Console less.
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.