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

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

profile pictureAWS
EXPERT
Uri
answered 2 years ago
profile picture
EXPERT
reviewed 22 days ago
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
answered 2 years ago
profile picture
EXPERT
reviewed 22 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions