Reputation: 141
I need to ping my EP with some ID of lambda task once lambda finished (pass or crash).
For pass event I can implement it in code, but what aboout crash event? Is there any generic solution in aws for this?
Upvotes: 0
Views: 96
Reputation: 3207
If you catch an exception could send the message otherwise for all unhandled exception/lambda crashes better to rely on creating lambda DLQ and use it for your purpose.
https://aws.amazon.com/about-aws/whats-new/2016/12/aws-lambda-supports-dead-letter-queues/
Extra: There are step functions https://aws.amazon.com/step-functions/ where there is a way to define if Lambda A is successful execute Lambda B , in case of failure call Lambda C.
If you try to make any kind of custom lambda observability check what is available on the market, there are way to do this without writing extra code inside your lambda.
Upvotes: 1
Reputation: 2321
You can do this using Cloudwatch with either custom metrics for specific errors or just use what they have for 400s or 500s. Then you can have an alarm for that which triggers a Cloudwatch rule (which you could call your crash event)
Upvotes: 0