Overview
This node acts as a trigger to consume messages from an AWS SQS (Simple Queue Service) queue. It periodically checks the specified SQS queue for new messages based on a user-defined interval and unit (seconds, minutes, or hours). Upon receiving messages, it can optionally delete them from the queue. This node is useful for workflows that need to react to incoming messages in an SQS queue, such as processing tasks, notifications, or integrating with other AWS services.
Use Case Examples
- A workflow that triggers whenever a new message arrives in an SQS queue to process orders.
- A system that monitors an SQS queue for alerts and sends notifications accordingly.
Properties
| Name | Meaning |
|---|---|
| Authentication | Authentication method to use for AWS SQS access, either Access Key or IAM Role (EC2 Instance). |
| AWS Region | The AWS region where the SQS queue is located, required if using IAM Role authentication. |
| Queue Name or ID | The SQS queue to monitor, selectable from a list or specified via expression. |
| Interval | The interval value at which the queue will be checked for new messages, minimum 1. |
| Unit | The unit of the interval value, can be seconds, minutes, or hours. |
| Options | Additional options for message retrieval and processing. |
Output
JSON
json- The received SQS messages as JSON objects, each representing a message from the queue.
Dependencies
- AWS SQS service
Troubleshooting
- If the interval is set to less than 1, the node throws an error indicating the interval must be at least 1 or higher.
- If 'Wait Time Seconds' is set outside the range 0-20, an error is thrown indicating the valid range.
- If the interval value in milliseconds exceeds the maximum allowed for setTimeout (2147483647), an error is thrown indicating the interval is too large.
- Errors from AWS API requests are wrapped and thrown as node API errors, which may indicate issues with credentials, permissions, or network connectivity.
Links
- AWS SQS ReceiveMessage API - Details on the parameters and behavior of receiving messages from SQS.
- n8n Expressions - Guide on how to use expressions in n8n to specify dynamic values such as queue names.