Overview
This node deletes a message from an AWS SQS (Simple Queue Service) queue. It is useful in workflows where you want to remove specific messages from a queue after processing them or when they are no longer needed. For example, after successfully handling a message retrieved from an SQS queue, this node can be used to delete that message to prevent it from being 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 receipt handle of the specific message to delete. This is a unique identifier for the message received from SQS. |
Output
The node outputs a JSON object for each input item processed with the following structure:
success: Boolean indicating if 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.- If an error occurs and the node is set to continue on failure, the output includes:
success:falseerror: Error message describing what went wrong.operation:"deleteMessage"timestamp: Timestamp of the failure event.
The node does not output binary data.
Dependencies
- Requires valid AWS credentials with permissions to delete messages from the specified SQS queue.
- Uses the AWS SDK for JavaScript v3 (
@aws-sdk/client-sqs). - The node expects AWS credentials (access key, secret key, region) to be configured in n8n.
Troubleshooting
- Common issues:
- Invalid or missing AWS credentials will cause authentication failures.
- Incorrect Queue URL or Receipt Handle will result in errors from AWS SQS.
- Attempting to delete a message that has already been deleted or whose receipt handle has expired will fail.
- Error messages:
- Errors from AWS are caught and reported with the prefix
AWS SQS Error:followed by the AWS error message. - To handle errors gracefully, enable "Continue On Fail" in the node settings; otherwise, the workflow will stop on the first error.
- Errors from AWS are caught and reported with the prefix
- Resolution tips:
- Verify that the Queue URL matches exactly the one shown in the AWS console.
- Ensure the Receipt Handle is obtained from a previous receive message operation and is current.
- Check IAM permissions to confirm the credentials have
sqs:DeleteMessagerights.