Created
October 5, 2019 21:14
-
-
Save jjergus/33ec7cc28b3bce71aaffce7bdb4de98f to your computer and use it in GitHub Desktop.
aws-step-function.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example input: | |
{ | |
"outerItems": [ | |
{"innerItems": ["foo", "bar"]}, | |
{"innerItems": ["herp", "derp"]} | |
] | |
} | |
// state machine JSON: | |
{ | |
"StartAt": "OuterMap", | |
"States": { | |
"OuterMap": { | |
"Type": "Map", | |
"End": true, | |
"ItemsPath": "$.outerItems", | |
"Iterator": { | |
"StartAt": "InnerMap", | |
"States": { | |
"InnerMap": { | |
"Type": "Map", | |
"Next": "P", | |
"ItemsPath": "$.innerItems", | |
"Iterator": { | |
"StartAt": "NoOp", | |
"States": { | |
"NoOp": { | |
"Type": "Pass", | |
"End": true | |
} | |
} | |
} | |
}, | |
"P": { | |
"Type": "Parallel", | |
"End": true, | |
"Branches": [ | |
{ | |
"StartAt": "Left", | |
"States": { | |
"Left": { | |
"Type": "Pass", | |
"End": true | |
} | |
} | |
}, | |
{ | |
"StartAt": "Right", | |
"States": { | |
"Right": { | |
"Type": "Pass", | |
"End": true | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment