SQS Receive
Receives one or more messages from an AWS SQS queue, with optional long-polling and optional auto-delete on receipt.
Inputs
Outputs
Output 1 — Messages Output 2 — ErrorReceiptHandle Passthrough → SQS Delete
SQS does not remove a message when it's received — it only becomes invisible for the
duration of the Visibility Timeout. To permanently remove a message you must delete it
using its ReceiptHandle.
Leave Auto-delete on Receipt unchecked (the default) to keep control over when a
message is deleted: each message in payload.messages[] carries its own
receiptHandle and queueUrl. Wire this node's output into an
SQS Delete node after your processing logic completes successfully, so a message
is only deleted once it has been handled — if processing fails, the message becomes visible
again after the timeout and can be retried or routed to a dead-letter queue.
Check Auto-delete on Receipt only when losing a message on a downstream failure is acceptable (e.g. best-effort notifications).
Built-in Polling (cron)
Enable built-in polling to have the node poll the queue on its own fixed interval — no upstream trigger message is required. While polling is on, the node's input port is removed so it can only be driven by its own timer. Each cycle runs after the previous one finishes (cycles never overlap), then waits Poll Interval seconds before the next. Combine with a non-zero Wait Time (long-poll) so each cycle waits efficiently for messages and minimizes empty receives / API cost.
Auto-delete applies in polling mode too: with Auto-delete on Receipt on, each
received message is deleted immediately (sqs.deleted reports how many);
with it off, wire the output into an SQS Delete node using the passed-through
receiptHandle.
How to Use
- Select an AWS config node (or create one with your AWS credentials/region).
- Enter the Queue URL.
- Optionally set Max Messages (1–10) and a Wait Time for long-polling to reduce empty responses and API calls.
- Decide on Auto-delete on Receipt — leave unchecked to wire a downstream
SQS Delete node using the passed-through
receiptHandle. - Wire the output: Output 1 = messages (check
msg.payload.count), Output 2 = AWS error.
ConnectHealth Example
Poll a queue for pending EHR sync jobs, process each, then delete on success:
// Node config:
Queue URL: https://sqs.us-east-1.amazonaws.com/123456789012/ehr-sync-jobs
Max Messages: 5
Wait Time: 10
Auto-delete: off
// Output 1 (count > 0):
msg.payload = {
count: 2,
messages: [
{
messageId: "a1b2c3",
body: { patientRef: "epic-A-123", action: "sync" },
attributes: { SentTimestamp: "1714000000000" },
messageAttributes: {},
receiptHandle: "AQEB...",
queueUrl: "https://sqs.us-east-1.amazonaws.com/123456789012/ehr-sync-jobs"
},
...
]
}
// Downstream: after processing succeeds, feed each message into
// ec-sqs-delete using its receiptHandle + queueUrl.
Best Practices
- Use a non-zero Wait Time (long-polling) to reduce empty receives and API cost.
- Keep Auto-delete on Receipt off for anything where processing can fail — delete only after successful handling, via SQS Delete.
- Set Visibility Timeout to comfortably exceed your expected processing time to avoid duplicate delivery.
- Never log
payload.messages[].bodyormessageAttributes— they may contain PHI. LogmessageIdand counts only.