I'm using SNS to trigger lambda functions in AWS. This works fine and as expected, but I'm wondering if there is a way to get feedback about the execution times and if an exception was raised within the function.
Obviously there is exception handling code in my lambda functions for most of the business logic, but I'm thinking about cases like an external program (like Ghostscript) that might end up in an endless loop and eventually get terminated by the 10 minute Lambda limit.
As far as I know you can do this easily if you invoke the method in an synchronous fashion, but I can't seem to find a way to get information about how long the execution lasted and if something bad happened.
Is there a way to subscribe to execution errors or similar, or have a callback from AWS (not my code) when an exception or timeout occurs?
Exceptions of Lambda functions will be in your logs, which are streamed to AWS CloudWatch Logs. Execution time is stored as the Lambda Duration metric in CloudWatch. You would need to setup CloudWatch alerts on those items to be notified.
Getting information about function execution time/billing and if the function call was successful