Overview
This node deletes messages from an AWS SQS (Simple Queue Service) queue. It is useful when you want to remove specific messages from a queue after processing them or if you need to manage the queue by deleting unwanted or processed messages.
Common scenarios include:
- Cleaning up messages that have been successfully processed by downstream workflows.
- Managing message lifecycle in distributed systems where messages must be explicitly deleted to prevent reprocessing.
- Automating queue maintenance tasks.
For example, after receiving and processing a message from an SQS queue, this node can be used to delete that message using its receipt handle, ensuring it does not get processed again.
Properties
| Name | Meaning |
|---|---|
| Queue URL | The full URL of the AWS SQS queue from which the message will be deleted. |
| Receipt Handle | The unique receipt handle of the message to delete. This identifies the specific message. |
Output
The node outputs JSON data for each processed item with the following structure:
success: Boolean indicating whether the deletion was successful.operation: Always"deleteMessage"to indicate the performed operation.queueUrl: The URL of the queue from which the message was deleted.receiptHandle: The receipt handle of the deleted message.requestId: The AWS request ID returned by the delete operation.timestamp: ISO string timestamp of when the operation was performed.error(only if failure): Error message describing why the deletion failed.
No binary data output is produced by this node.
Dependencies
- Requires valid AWS credentials with permissions to delete messages from the specified SQS queue.
- AWS SDK for JavaScript is used internally to interact with AWS SQS.
- The node expects AWS credentials to be configured in n8n via an API key credential with access key, secret key, and region.
Troubleshooting
Common issues:
- Invalid or expired AWS credentials will cause authentication failures.
- Incorrect queue URL or receipt handle will result in errors from AWS.
- Attempting to delete a message that has already been deleted or whose visibility timeout expired may fail.
Error messages:
- Errors are prefixed with
AWS SQS Error:followed by the AWS error message. - If the node is set to continue on failure, errors are included in the output JSON under the
errorfield. - To resolve errors, verify AWS credentials, ensure the queue URL and receipt handle are correct, and confirm the message is still available for deletion.
- Errors are prefixed with