Skip to content

Instantly share code, notes, and snippets.

@jjergus
Created October 5, 2019 21:14
Show Gist options
  • Save jjergus/33ec7cc28b3bce71aaffce7bdb4de98f to your computer and use it in GitHub Desktop.
Save jjergus/33ec7cc28b3bce71aaffce7bdb4de98f to your computer and use it in GitHub Desktop.
aws-step-function.json
// 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