Step Functions

AWS Step Functions is a web service that allows coordinating the components of a distributed or microservices application using visual workflows. The service is designed to allow declarative design of a state machine that represents the state of each workflow execution.

vs SWF

Unlike SWF there's no need to implement a decider program, as this logic is instead declared declaratively. You may need to use SWF if you need more control over the decision making process, especially when you need to consider external signals or launch child processes.

Concepts

  • State machines are graphical representations of workflows, edited either as ASL or in Workflow Studio.
  • They're made up of steps.
  • Executions are runs of a state machine. State changes

Workflow types

  • Standard workflows are ideal for long-running, durable and auditable workflows. They can run for up to a year and the full execution history is retained for 90 days.
  • Express workflows are suited to higher volume event processing worloads, running at-least-once (potentially more than once).

State types

  • Task states perform some work.
  • Choice states make a decision before selecting a branch.
  • Fail states and succeed states stop the execution with a result.
  • Pass states pass input to output or inject constant data.
  • Wait states delay for a time interval or until the specified time/date.
  • Parallel states begin execution of parallel branches.
  • Map states dynamically iterate steps.