Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS Serverless Failure Management With Dead-Letter Queues


Failure Management With Dead-Letter Queues

You can build specialized dead-letter queue resources using Amazon SNS or SQS.

A dead-letter queue is a place for messages that can't be delivered successfully.

It is recommended to enable special dead-letter queues for asynchronous Lambda functions.

For each function, you must first construct the queue or SNS topic.

It is because the Lambda function is configured as an event source.


Failure Management With Dead-Letter Queues Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


Queue policy

For the dead-letter queue on the source queue, you can create a queue policy.

The policy specifies how many times a message is retried before being rejected.

This allows you to see the queue independent of its goal.

Messages that fail after two built-in retries are directed to the dead-letter queue.

Dead-letter queue messages can help you analyze the cause of failure.


AWS Event Fork Pipelines

AWS Event Fork Pipelines are pre-built apps accessible in the AWS Serverless Application Repository.

They can help you reroute the communications back to their origin in case of failure.


Dead-Letter Queue on Lambda Function vs. Dead-Letter Queue on SQS Source Queue

The table below compares Dead-Letter Queue on Lambda Function and Dead-Letter Queue on SQS Source Queue.

Dead-Letter Queue on SQS Source Queue Dead-Letter Queue on Lambda Function
Dead-letter queue is part of queue policy Messages that fail after two attempts are forwarded to the dead-letter queue
Policy defines the number of retries before moving an item to dead-letter queue Configuration of a dead-letter queue as part of a function
Need a way to send messages back to the source for processing

Related reads:

AWS Lambda Function Dead-Letter Queues
Amazon SNS Dead-Letter Queues
Amazon SQS Dead-Letter Queues

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

Where will a message go if it can't be successfully delivered?

To a  

Start the Exercise


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.