Skip to content

Instantly share code, notes, and snippets.

@gowthamgts
Created December 3, 2016 07:48
Show Gist options
  • Save gowthamgts/8c5646ebd811dbc205988b0b2a61bda7 to your computer and use it in GitHub Desktop.
Save gowthamgts/8c5646ebd811dbc205988b0b2a61bda7 to your computer and use it in GitHub Desktop.
{
"Comment": "An example of the Amazon States Language using a choice state.",
"StartAt": "ChoiceState",
"States": {
"ChoiceState": {
"Type" : "Choice",
"Choices": [
{
"Variable": "$.foo",
"NumericEquals": 1,
"Next": "FirstMatchState"
},
{
"Variable": "$.foo",
"NumericEquals": 2,
"Next": "SecondMatchState"
}
],
"Default": "DefaultState"
},
"FirstMatchState": {
"Type" : "Pass",
"Next": "NextState"
},
"SecondMatchState": {
"Type" : "Pass",
"Next": "NextState"
},
"DefaultState": {
"Type": "Fail",
"Cause": "No Matches!"
},
"NextState": {
"Type": "Task",
"Resource": "arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME",
"End": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment