javascriptamazon-web-servicesaws-lambdaamazon-snsrequest-timed-out

Can we attach SNS notification when any aws lambda function gets timed-out?


I need to send notification mail if my lambda function gets any error or got timed out. I had handled errors programmatically in function code but unable to notify when function gets timed out. I am ready with my SNS topic and all.

Can anyone please help regarding this.


Solution

  • Yes, You can provide SNS as the DLQ(Dead Letter Queue) Resource for your asynchronous Lambda functions (where the event sources are not stream based).

    On failures like timeout, resource constraints, endpoint access issues, the exception thrown by the lambda function will be sent to the configured DLQ.