Overview
Lab details
- This lab will walk you through the steps to create and understand SQS Dead-Letter Queues in the context of Amazon Simple Queue Service in AWS.
- Duration: 45 minutes
- AWS Region: US East (N. Virginia) us-east-1.
Introduction
What is SQS Dead-Letter Queue
- SQS Dead Letter Queue (DLQ) is a feature in Amazon SQS designed for handling messages that repeatedly fail processing.
- Messages are moved to the DLQ after a configured maximum number of processing attempts, preventing infinite processing loops.
- Users can configure parameters such as MaximumReceives to control when messages are moved to the DLQ.
- Failed messages are isolated in the DLQ, allowing developers to analyze and troubleshoot processing issues without affecting the main queue.
- DLQ supports automatic retries, attempting to process failed messages again and moving them back to the main queue under specified conditions.
- Integration with AWS CloudWatch enables monitoring of the DLQ, and notifications can be set up to alert administrators when messages are moved to the Dead Letter Queue.
Architecture diagram

Task details
- Sign in to the AWS Management Console.
- Create SQS Dead-Letter Queues.
- Send and Receive Messages
- Validation Of The Lab.
Launching the lab environment
- To launch the lab environment, Click on the Launch lab button.
- Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
- Once the Lab is started, you will be provided with IAM username, Password, Access Key, and Secret Access Key.
Lab guide
Lab steps
Task 1: Sign in to AWS Management Console
- Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
- On the AWS sign-in page,
- Leave the Account ID as default. Never edit/remove the 12-digit Account ID present in the AWS Console. Otherwise, you cannot proceed with the lab.
- Now copy your User Name and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign in button.
- Once Signed In to the AWS Management Console, make the default AWS Region as US East (N. Virginia) us-east-1.
Task 2 : Create SQS Dead-letter Queues
In this task, we are going to create a Dead-Letter queue and a primary testing queue.- Make sure you are in the N. Virginia region.
- Navigate to the Services menu on the top, search for SQS and select it.
- Click on the Create queue button.
-
Details :
- Type : Select Standard
- Name : Enter WhizQueue.
- Configurations:
- Message retenation period : Enter 14 Days

- Leave everything as default and click on Create queue button
- Once you click on Create Queue, you will get a success message.
- Now, We’ll create a Primary Queue, with all the default options and assign previously created queue with primary queue.
- Click on Create queue button.
- Details :
- Type : Select Standard
- Name : Enter TestQueue

- Dead-letter queue : Select Enabled
- Choose queue : Select WhizQueue arn
- Maximum receives : Enter 1

- Click on the Create queue button.
Task 3 : Send and Receive Messages
- We’ll be now sending a message from our Testing queue.
- Click on Send and receive messages button.

- Send message
- Message body : Enter My first queue message

- Now click on Send message button
- Once you have sent a message, you get an acknowledgment.
- After sending the message, we can see that Messages available changes to 1.

- Now, to get all the messages we have sent, click on Poll for messages in the Receive messages section.
- We can now see the message column has been filled with the messages.

- Then click on the message to see its body.

- Now, try to click on poll for messages again. You will see the messages available will become 0.

- As we received the message once and added the received count to 1 limit to the TestQueue this time the message we polled has been moved into the WhizQueue.
- Now, let’s navigate to the Queue Dashboard and check the message available count in both queues.

- You will notice the message availability in WhizQueue is 1 and TestQueue as 0 message available.
- Let’s click on WhizQueue to check the message and click on Send and receive messages. Now, to get the message, click on Poll for messages in the Receive messages section.
- Also notice the receive count which is 2 that means it is same message which we received on TestQueue.

- To verify the message click on the messages to see its body you will see the message body as same which we send previously.

Task 4 : Validation Test
- Once The Lab Steps Are Completed, Please Click On the Check my work button On The Right Side Panel.
- This Will Validate The Resources In The AWS Account And Shows You Whether You Have Completed This Lab Successfully Or Not.
- Sample Output :

Completion and conclusion
- You have successfully created dead-letter queue
- You have successfully received the message in dead-letter queue.
End lab
- Sign out of the AWS Account.
- You have successfully completed the lab.
- Once you have completed the steps, click on End Lab from your whizlab’s dashboard.
What gets checked
When you press Check my work, the platform verifies each of these:- Create SQS Standard Dead Letter Queue — Check whether a Standard SQS Dead Letter Queue is created or not.
- Create Standard SQS Queue — Check whether a Standard SQS Queue is created or not.