AWS SQS icon

AWS SQS

Consume and send messages to AWS SQS

Actions5

Overview

This node interacts with AWS SQS (Simple Queue Service) to manage messages and queues. Specifically, the 'Delete' operation deletes a message from an SQS queue using the message's receipt handle. This is useful for workflows that need to remove processed messages from the queue to prevent reprocessing. For example, after successfully processing a message, this node can delete it to maintain queue hygiene.

Use Case Examples

  1. Deleting a message from an SQS queue after processing it to ensure it is not processed again.
  2. Automating message cleanup in an AWS SQS queue as part of a larger workflow.

Properties

Name Meaning
Queue Name or URL The name of the SQS queue or the full queue URL where the message resides. This is required to identify the target queue for the delete operation.
Receipt Handle The receipt handle associated with the message to delete. This is a unique identifier for the message received from the queue and is required to delete the specific message.

Output

JSON

  • json
    • success - Indicates whether the message was successfully deleted (true if successful).

Dependencies

  • AWS SDK for JavaScript (v3) - specifically @aws-sdk/client-sqs

Troubleshooting

  • Ensure the 'Queue Name or URL' is correct and the queue exists in the specified AWS region and account. An incorrect queue name or URL will cause an error indicating the queue does not exist.
  • The 'Receipt Handle' must be the exact handle received when the message was retrieved. Using an incorrect or expired receipt handle will result in a failure to delete the message.
  • Verify that the AWS credentials used have sufficient permissions to delete messages from the specified SQS queue.
  • Common error messages include 'QueueDoesNotExist' if the queue is not found, and permission errors if the credentials lack delete permissions. Resolving these involves checking queue details and AWS IAM policies.

Links

  • AWS SQS DeleteMessage API - Official AWS documentation for the DeleteMessage API used to delete messages from an SQS queue.

Discussion