Step Functions is a fully managed long-running, serverless workflow service that provides state machines.
- Workflow steps are known as states, and they can perform work via tasks.
- A state machine can be defined using JSON-based Amazon States Language (ASL). State machines maintain states (Lambda is a shot-running stateless function) and allow longer running processes.
- Tasks are performing actions.
- Activity is a program code that interacts with Step Functions using API actions (CreateStateMachine, StartExecution, StopExecution, GetActivityTask, SendTaskSuccess, SendTaskFailure …)
- Lambda function responds to the state machine tasks.
- State: Each state in a state machine makes decisions based on inputs, perform actions, and passes output.
- Task, Choice, Success, Fail, Pass, Wait, Parallel
Step functions replace SWF (Simple Work Function) with a serverless version.
- To make a decision, SWF uses a decider program, and Step Functions use a JSON-based state machine.
- Step Functions provides the visual workflows.
- Step Functions orchestrate multiple AWS resources.
- SWF provides complete control over the workflow but increases the complexity.