DeleteMessageBatch
Source:
src/AWS/SQS/DeleteMessageBatch.ts
Runtime binding for sqs:DeleteMessageBatch.
Bind this operation to a Queue inside a function runtime to delete
up to 10 received messages per call with per-entry success/failure results.
The binding grants the host function sqs:DeleteMessage on the queue.
Provide the DeleteMessageBatchHttp layer on the Function to implement the
binding.
Deleting Message Batches
Section titled “Deleting Message Batches”// init (provide SQS.DeleteMessageBatchHttp on the Function)const deleteMessageBatch = yield* SQS.DeleteMessageBatch(queue);
// runtime: acknowledge messages received via ReceiveMessageconst result = yield* deleteMessageBatch({ Entries: messages.map((message, index) => ({ Id: `${index}`, ReceiptHandle: message.ReceiptHandle!, })),});// result.Successful / result.Failed