AWS1 input → 2 outputs
SQS Delete
Deletes one message, or many messages in a single batch call, from an SQS queue using their receipt handle(s). This permanently removes the message(s) from the queue — call it only after the message has been fully processed.
Inputs
Batch mode is chosen automatically whenever any of the three array shapes above is present;
otherwise the node performs a single delete using payload.receiptHandle (or the
node's static Receipt Handle).
Outputs
Output 1 — Success Output 2 — ErrorHow to Use
- Select an AWS config node (or create one with your AWS credentials/region).
- Enter the Queue URL, or supply it at runtime via
msg.payload.queueUrl. - Single: wire this node after processing one message from SQS Receive and pass its
ReceiptHandleasmsg.payload.receiptHandle. - Batch: pass the array of processed messages/handles as
msg.payload.messagesormsg.payload.receiptHandles(or as the wholemsg.payload). - Wire the output: Output 1 = success/partial success, Output 2 = AWS error or total batch failure.
ConnectHealth Example
Delete a single message after successfully processing an EHR sync event:
msg.payload = {
queueUrl: "https://sqs.us-east-1.amazonaws.com/123456789012/fhir-sync",
receiptHandle: "AQEB3s...=="
};
// Output 1 on success:
msg.payload = { success: true, deleted: 1 }
Delete a batch of messages received together from SQS Receive:
msg.payload = {
messages: [
{ MessageId: "m1", ReceiptHandle: "AQEB1..." },
{ MessageId: "m2", ReceiptHandle: "AQEB2..." }
]
};
// Output 1 (all succeeded):
msg.payload = {
success: true,
deleted: 2,
failed: 0,
Successful: [ ... ],
Failed: []
}
Best Practices
- Only delete a message after it has been fully and durably processed — deletion is permanent and cannot be undone.
- For batch input, a partial failure (some entries succeed, some fail) still routes to Output 1 — check
payload.failedandpayload.Failedand retry those handles if needed. - If every entry in a batch fails, the message routes to Output 2 instead.
- Never log or persist receipt handles or message bodies outside of this flow — they are transient references, and message bodies/attributes may carry PHI.