{ "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": [ { "Or": [ { "And": [ { "Variable": "$.foo", "NumericEquals": 1 }, { "Variable": "$.bar", "NumericEquals": 2 } ] }, { "Variable": "$.foo", "NumericEquals": 3 } ], "Next": "SecondMatchState" } ], "Default": "DefaultState" }, "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 } } }