AWS Lambda Finite State Machines

A Python framework for developing finite state machine-based workflows on AWS Lambda.

View project on GitHub
Running on AWS » Setup AWS Services »

Running on AWS Step Functions

AWS Step Functions has tight integration with AWS Lambda and can easily be used to execute an existing deployed FSM.

Simply use the provided script in tools/yaml_to_json.py to generate a State Language JSON document pointing at the an existing deployed FSM AWS Lambda function.

% python tools/yaml_to_json.py --machine_name=tracer --lambda_arn=arn:aws:lambda:us-east-1:999999999999:function:fsm
{
  "Comment": "tracer",
  "States": {
    "state1": {
      "Resource": "arn:aws:lambda:us-east-1:999999999999:function:fsm",
      "Type": "Task",
      "Next": "state1-choices"
    },
    ...
  }
  "StartAt": "state1"
}

The deployed fsm.yaml and the JSON document must match, otherwise the machines can get out of sync. So changes to the fsm.yaml require corresponding changes the JSON document.

Running on AWS » Setup AWS Services »