Ensure that each Amazon SQS queue is configured to use a Dead-Letter Queue (DLQ) in order to help maintain the queue flow and avoid losing data by detecting and mitigating failures and service disruptions on time. A Dead-Letter Queue is an SQS queue useful for debugging your application or your messaging system, which can isolate messages that can't be processed successfully for later analysis.
This rule can help you with the following compliance standards:
- NIST4
For further details on compliance standards supported by Conformity, see here.
This rule can help you work with the AWS Well-Architected Framework.
This rule resolution is part of the Conformity Security & Compliance tool for AWS.
excellence
Enabling Dead-Letter Queues (DLQs) for Amazon SQS queues can help you troubleshoot incorrect message transmission operations that can lead to data loss. Use DLQs to decrease the number of unprocessed messages and reduce the possibility of exposing your SQS queues to poison pill messages (i.e. messages that are received but can't be processed).
Audit
To determine if Dead-Letter Queues are configured for all your SQS queues, perform the following operations:
Remediation / Resolution
To create and configure a Dead-Letter Queue (DLQ) in order to prevent endless processing of invalid messages for your Amazon SQS queues, perform the following operations:
References
- AWS Documentation
- Amazon SQS FAQs
- Working with Amazon SQS Messages
- Amazon SQS Dead-Letter Queues
- Configuring a dead-letter queue (console)
- AWS Command Line Interface (CLI) Documentation
- sqs
- list-queues
- get-queue-attributes
- create-queue
- set-queue-attributes
- CloudFormation Documentation
- Amazon Simple Queue Service resource type reference
- Terraform Documentation
- AWS Provider