This chapter is an outline. The curriculum, learning objectives and
structure are settled; the prose, diagrams and code are still being written.
What is below is the plan for the chapter, not the chapter.
Lab 05 — Configure a dead letter queue
Goal
Watch a poison message land in quarantine after exactly maxReceiveCount receives.
Setup
To be written — CLI commands and an IaC equivalent for every resource, all prefixed sqs-course-.
Steps
- Create a DLQ and attach a redrive policy with
maxReceiveCount = 3 - Send a message your consumer will always reject
- Run a consumer that receives and never deletes
- Count the receives; note the move happens on the attempt after the count exceeds 3
- Inspect the message in the DLQ, including its receive count
- Set a CloudWatch alarm on DLQ depth > 0 and watch it fire
- Fix the consumer and redrive with
StartMessageMoveTask
What you should observe
- The move is triggered by a receive, not by a failure
- The DLQ message retains its original attributes and receive count
- Redrive returns it to the source queue for another try
Why it happened
To be written — ties each observation back to the mechanism in 11 — Dead Letter Queues.
Experiments to try
To be written — deliberate variations that change the outcome.
Teardown
To be written — every resource created above, in dependency order.
← Back to: 29 — Hands-on Labs