Skip to content

ExecuteStatement

Source: src/AWS/DynamoDB/ExecuteStatement.ts

Runtime binding for DynamoDB PartiQL ExecuteStatement.

This binding scopes IAM to a specific table, but the statement text is still user-provided. Statements must only reference the bound table or its indexes.

const executeStatement = yield* ExecuteStatement.bind(table);
const response = yield* executeStatement({
Statement: `SELECT * FROM "${yield* table.tableName}" WHERE pk=?`,
Parameters: [{ S: "user#1" }],
});