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 Antworten
1

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

profile pictureAWS
EXPERTE
Uri
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
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
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen