{ "Comment": "An example of the Amazon States Language using a choice state.", "StartAt": "FirstState", "States": { "FirstState": { "Type": "Task", "Resource": "arn:aws:lambda:region-1:1234567890:function:FUNCTION_NAME", "Next": "ChoiceState" }, "ChoiceState": { "Type": "Choice", "Choices": [ { "Variable": "$.foo", "NumericEquals": 1, "Next": "FirstMatchState" }, { "Or": [ { "Variable": "$.foo", "NumericEquals": 2 }, { "Variable": "$.foo", "NumericEquals": 3 } ], "Next": "SecondMatchState" } ], "Default": "DefaultState" }, "FirstMatchState": { "Type": "Task", "Resource": "arn:aws:lambda:region-1:1234567890:function:OnFirstMatch", "Next": "NextState" }, "SecondMatchState": { "Type": "Task", "Resource": "arn:aws:lambda:region-1:1234567890:function:OnSecondMatch", "Next": "NextState" }, "DefaultState": { "Type": "Fail", "Error": "DefaultStateError", "Cause": "No Matches!" }, "NextState": { "Type": "Task", "Resource": "arn:aws:lambda:region-1:1234567890:function:FUNCTION_NAME", "End": true } } }