Skip to content

BatchGetItem

Source: src/AWS/DynamoDB/BatchGetItem.ts

Runtime binding for dynamodb:BatchGetItem.

Bind this operation to one or more tables and key the request by each bound table’s LogicalId. The binding resolves those logical IDs to physical table names at runtime.

const batchGetItem = yield* BatchGetItem.bind(sourceTable, archiveTable);
const response = yield* batchGetItem({
RequestItems: {
[sourceTable.LogicalId]: {
Keys: [{ pk: { S: "user#1" }, sk: { S: "profile" } }],
},
[archiveTable.LogicalId]: {
Keys: [{ pk: { S: "user#1" }, sk: { S: "profile" } }],
},
},
});