AWS SQS Delete icon

AWS SQS Delete

Delete messages from AWS SQS queues

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, ensuring they are not processed again. For example, after successfully handling a message retrieved from an SQS queue, you can use this node to delete that message by providing its receipt handle.

Common scenarios include:

  • Cleaning up messages after processing in a workflow.
  • Managing message lifecycle in distributed systems.
  • Ensuring exactly-once processing semantics by deleting messages only after successful handling.

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 if the deletion was successful.
  • operation: Always "deleteMessage" to indicate the performed operation.
  • queueUrl: The URL of the queue where 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 occurred.

If the deletion fails and the node is set to continue on failure, the output includes:

  • success: false
  • error: Error message describing the failure.
  • operation: "deleteMessage"
  • timestamp: Timestamp of the failure.

The node does not output binary data.

Dependencies

  • Requires valid AWS credentials with permissions to delete messages from the specified SQS queue.
  • AWS SDK for JavaScript (aws-sdk) is used internally.
  • The node expects AWS credentials configured in n8n (access key, secret key, and region).

Troubleshooting

  • Common issues:

    • Invalid or missing 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 receipt handle 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 resolve, verify the queue URL and receipt handle correctness.
    • Ensure the AWS credentials have sufficient permissions.
    • If using "Continue On Fail" mode, failed deletions will be reported in the output without stopping the workflow.

Links and References

Discussion