Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

AWS Serverless Step Functions for Failure Management


Step Functions for Failure Management

Step Functions were introduced as a method of visualizing and coordinating your workflow.

Step functions work in steps.

Use Step Functions to reduce the amount of custom call retries.

Step Functions provides try/catch/finally logic for known and unexpected faults.


Step Functions for Failure Management Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


How it works

Step Functions goes through the "catchers" for a matching error.

Each catcher has the ability to manage several mistakes.

Step Functions also allows you to use a visual workflow to debug issues.

You may also see information about the execution, like the thrown errors or created outputs.

The execution history in Step Functions is a useful tool for diagnostics.

Ensure that production code can handle AWS Lambda service errors as a best practice.

Lambda service exceptions should be handled by any jobs that call a Lambda function.


The SAGA Pattern

Step Functions also provide an error handling way called the SAGA pattern.

It is used to handle failures when each phase involves transactions that erase previous changes.


Related reads:

Handling Error Conditions Using a State Machine
Error Handling: Examples Using Retry and Using Catch
Handle Lambda Service Exceptions

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

How Step Functions work?

In 

Start the Exercise