This repository was archived by the owner on Jun 16, 2023. It is now read-only.
Amazon SNS Supports Using Dead-Letter Queues to Capture Undeliverable Messages
A dead-letter queue is an Amazon SQS queue that an Amazon SNS subscription can target for messages that can't be delivered to subscribers successfully. Messages that can't be delivered due to client errors or server errors are held in the dead-letter queue for further analysis or reprocessing.
Note
- The Amazon SNS subscription and Amazon SQS queue must be under the same AWS account and Region.
- Currently, you can't use an Amazon SQS FIFO queue as a dead-letter queue for an Amazon SNS subscription.
- To use an encrypted Amazon SQS queue as a dead-letter queue, you must use a custom CMK with a key policy that grants the Amazon SNS service principal access to AWS KMS API actions. For more information, see Protecting Amazon SNS Data Using Server-Side Encryption (SSE) and AWS KMS in the Amazon SNS Developer Guide and Protecting Amazon SQS Data Using Server-Side Encryption (SSE) and AWS KMS in the Amazon SQS Developer Guide.
For more information, see the following resources:
Amazon SNS Developer Guide
- Amazon SNS Dead-Letter Queues
- Configuring an Amazon SNS Dead-Letter Queue for an Amazon SNS Subscription
- Message Delivery Retries
- Amazon SNS Metrics (
NumberOfNotificationsRedrivenToDlq
andNumberOfNotificationsFailedToRedriveToDlq
)
Amazon SNS API Reference (RedrivePolicy
request parameter attribute)