In this video I will explain how the Lambda function retry mechanism works. First of all, there are different retry behaviour based on the type of event:
1. **Synchronous events** (such as API Gateway): will not trigger any auto-retry policy. It’s the application responsibility to implement the fallback system.
2. **Async Events** (such as SQS and SNS): will trigger two retries (by default). If all retries have failed, it’s important to save the event somewhere. For example, in a Dead Letter Queue (DLQ).
3. **Stream Based Events:** (such as Dynamo DB Streams): will retry the event until the data expires or is processed successfully.
You need to decide if it’s worth retrying or not. If you want to avoid the retry process, you can set the max retry value to 0. Otherwise, you can use two main approaches:
– Dead Letter Queue
– Step Functions
00:00 Introduction
00:16 Lambda Retry Policy
01:05 Lambda Retry Conditions
02:07 Is It Worth Retrying?
03:13 Dead Letter Queue
05:28 DLQ on AWS Console
06:32 Retry attempts with Step Functions
If you want to learn more about AWS Services, make sure to
subscribe to the channel:
Youtube 🎥 –
Medium:
🌎 Find me here:
Twitter –
source