Failure handling between S3 trigger and Lambda

0

We added the S3 trigger to Lambda. How is the failure handled between S3 trigger and Lambda? What will happen if the lambda throw error ? Will it retry ? What metrics we should monitor to capture this failure to alert for manual intervention ? Can we configure retries similar to SQS and monitor DLQ ?

已提問 2 年前檢視次數 7027 次
2 個答案
1

Depending on the error Lambda will retry. You can enable Lambda Destinations to get notified about errors.

profile pictureAWS
專家
Uri
已回答 2 年前
profile picture
專家
已審閱 1 個月前
1

The relation between Amazon s3 and Lambda is event based; asynchronous invocation. So, Lambda queues the event before passing it to your function. As it is asynchronous, by default will retry it up to two times. The event is kept for up to six hours. If all attempts fail or the time is too long, the event is discarded.

In order to capture the error, you need to configure the error handling in Lambda and define the destination in case of failure. Here the documentation describing how to do it: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html

AWS
已回答 2 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南