DeleteMessage
Source:
src/AWS/SQS/DeleteMessage.ts
Runtime binding for sqs:DeleteMessage.
Bind this operation to a Queue inside a function runtime to delete
a message after it has been received and processed. The binding grants the
host function sqs:DeleteMessage on the queue. Provide the
DeleteMessageHttp layer on the Function to implement the binding.
Deleting Messages
Section titled “Deleting Messages”// init (provide SQS.DeleteMessageHttp on the Function)const deleteMessage = yield* SQS.DeleteMessage(queue);
// runtime: acknowledge a message received via ReceiveMessageconst result = yield* receiveMessage({ MaxNumberOfMessages: 1 });const [message] = result.Messages ?? [];if (message?.ReceiptHandle) { yield* deleteMessage({ ReceiptHandle: message.ReceiptHandle });}