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 in workflows where you want to remove specific messages from a queue after processing them or when cleaning up unwanted messages. For example, after successfully processing 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 uniquely identifies the message.

Output

The node outputs JSON data 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 occurred.
  • 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.
  • Uses AWS SDK for JavaScript v3 (@aws-sdk/client-sqs) internally.
  • The node expects AWS credentials to be configured in n8n (e.g., via an API key credential).

Troubleshooting

  • Common issues:
    • Invalid or missing AWS credentials will cause authentication errors.
    • Incorrect Queue URL or Receipt Handle will result in failure to delete the message.
    • Attempting to delete a message that has already been deleted or whose receipt handle expired will fail.
  • Error messages:
    • Errors are prefixed with "AWS SQS Error:" followed by the AWS SDK error message.
    • To resolve, verify the queue URL and receipt handle correctness, and ensure the credentials have proper permissions.
  • If "Continue On Fail" is enabled, the node will continue processing subsequent items even if some deletions fail, reporting errors in the output.

Links and References

Discussion