AWS Serverless Failed-Event Destinations
Failed-Event Destinations
You can define on-failure destinations for Lambda functions.
An on-failure destination is a place where data is stored when Lambda's execution fails.
You can do it for both asynchronous and streaming event sources.
You can use SNS topic, SQS Queue, or another Lambda function as the asynchronous source.
You can also use SNS topic or SQS queue as a streaming event source.
Failed-Event Destinations Video
W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.
How Failed-Event Destination Works
The SendOrder Step Function starts the SNS topic "Fulfillment".
An SNS topic is a communication access point.
It has subscribers that take care of any fulfillment needs.
Should a subscriber fail, there is an on-failure destination to store the record.
You must set an on-failure destination.
The on-failure destination stores more data than the dead-letter queue's event object.
You can also define on-success destinations for successfully processed events.
An on-failure destination gives you more options to adjust or modify your failure patterns.
The task subscriber can be a Lambda function.