An SQS dead-letter queue takes two minutes to set up: one entry in the redrive policy and you are done. It gets serious on the day a few hundred orders are sitting in it. Who notices? What is in those messages? And how do you get them back into processing without knocking over the downstream API again?
I care about this topic because in many serverless architectures the DLQ ends up as a ticked box on a checklist. It exists, nobody looks inside, there is no alarm and no plan for the way back. At that point it turns into a place where messages quietly disappear after a few days. In this article you will therefore use the Serverless Framework to build a queue with a DLQ that raises an alarm, can be inspected safely and is redriven in a controlled way by a script.
In short
An SQS dead-letter queue collects messages that were not processed after maxReceiveCount receives.…