Create a new queue to receive the undeliverable messages using the steps outlined here from the console or here using AWS CLI. I created “dl-queue” to be used as the dead letter queue for the “test” queue.
Select the “test” queue and choose “Edit”.
Scroll down to the “Dead-letter queue” option and expand it by clicking on the triangle icon on the left. Choose “Enabled”. You’ll not be asked to choose an existing queue as the dead-letter queue. Drop down on the “Queue ARN” option to choose the “dl-queue” as the dead letter queue and choose “Save”.
“dl-queue” has been set as the dead-letter queue for the “test” queue.