A dead-letter queue (DLQ) captures messages that fail processing after a set number of attempts, so they don’t block the main queue and can be inspected or reprocessed later.
How the redrive policy works
Configure the source queue’s redrive policy with a dead-letter queue and a maxReceiveCount. When a message is received repeatedly without being deleted and exceeds that configured count, SQS moves it to the DLQ. This isolates poison messages for investigation instead of allowing repeated failures to consume processing capacity.
Exam traps and operational checks
- Visibility timeout: controls how long a received message stays hidden before it can be received again; it does not replace a DLQ.
- maxReceiveCount: choose a value that allows reasonable retries before moving a message aside; too low a value can divert transient failures prematurely.
- Queue type: use a compatible DLQ type for the source queue. For FIFO workflows, consider that moving a failed message aside can affect end-to-end ordering expectations.
- Retention: configure the DLQ retention period so there is enough time to inspect and remediate failed messages.
- Redrive: after fixing the underlying issue, messages can be moved back for processing using the SQS redrive workflow.
Test yourself
Some SQS messages repeatedly fail processing and block the queue. You want to isolate them for later inspection without stalling the rest. What do you configure?
- A larger queue
- A dead-letter queue with a redrive policy
- A FIFO queue
- A longer visibility timeout only
👉 Click to reveal the answer & explanation
Correct answer: B. A dead-letter queue with a redrive policy moves messages that fail after N attempts out of the main queue for isolation and later analysis. A bigger queue (A) doesn’t isolate failures; FIFO (C) is about ordering; a longer visibility timeout (D) just delays retries.
Related topics
Amazon SQS · Amazon SNS · AWS Lambda
Build your AWS certification readiness
Stop guessing whether you’re ready. Our full-length, exam-realistic practice exams put you through the exact question style you’ll face — with a detailed explanation behind every answer, so you learn why, not just what.
- ✓ 6 full-length practice exams
- ✓ A detailed explanation for every single question
- ✓ Realistic, scenario-based questions — not memory dumps
- ✓ 6 months of access to your selected certification pack
Explore AWS Practice Exam Packs →or choose a free practice exam