This article will guide you how to handle #errors in Serverless Applications with AWS Step Functions. Combining AWS Step Functions with AWS Lambda makes it simple to orchestrate #AWS #Lambda functions for serverless applications.
To help you deal with errors in Lambda applications, Lambda integrates with services like #Amazon CloudWatch and AWS X-Ray. You can use a combination of logs, metrics, alarms, and tracing to quickly detect and identify issues in your function code, API, or other resources that support your application.
Lambda functions can fail in three cases:
i. An unhandled exception is raised — whether if we received an invalid input, an external API failed, or just a programming bug occurred.
ii. Timeout — Lambda running longer than the configured timeout duration is violently closed with a ‘Task timed out after … seconds’ message. The default value is 6 seconds, and the maximal value is 5 minutes.
iii. Out of memory — In this case, the lambda usually terminates with ‘Process exited before completing request’. The ‘Memory Size’ is equal to ‘Max Memory Used’.