I'm trying to create an AWS Step function, but it is showing an error message as Field Parameters is not supported in the Choice state inside a Parallel branch. I used the following code:
{
"Comment": "A Parallel Step Function",
"StartAt": "ParentStep",
"States":
{
"ParentStep":
{
"Comment": "Parallel test execution to check the Input Flow",
"Type": "Parallel",
"End": true,
"Branches":
[
{
"Comment": "Parallel Execution 1",
"StartAt": "branch1",
"States":
{
"branch1":
{
"Comment": "branch1 started",
"Parameters":
{
"testvalue1.$": "$.value1"
},
"Type": "Choice",
"Choices":
[
{
"Variable": "$.testvalue1",
"NumericEquals": 1,
"Next": "subbranch1"
},
{
"Not":
{
"Variable": "$.testvalue1",
"NumericEquals": 1
},
"Next": "subbranch2"
}
],
"Default": "subbranch2"
},
"subbranch1":
{
"Comment": "sub-branch 1",
"Type": "Pass",
"End": true
},
"subbranch2":
{
"Comment": "Ending branch 1",
"Type": "Pass",
"End": true
}
}
},
{
"Comment": "Parallel Execution 2",
"StartAt": "branch2",
"States":
{
"branch2":
{
"Comment": "starting branch 2",
"Parameters":
{
"testvalue2.$": "$.value2"
},
"Type": "Choice",
"Choices":
[
{
"Variable": "$.testvalue2",
"NumericEquals": 2,
"Next": "subbranch3"
},
{
"Not":
{
"Variable": "$.testvalue2",
"NumericEquals": 2
},
"Next": "subbranch4"
}
],
"Default": "subbranch4"
},
"subbranch3":
{
"Comment": "sub-branch 3",
"Type": "Pass",
"End": true
},
"subbranch4":
{
"Comment": "Ending Parallel Execution 2",
"Type": "Pass",
"End": true
}
}
}
]
}}}
However, the same code works if I replace the Choice state with a Task state. Is the field Parameters is not supported in the Choice state? I went through the AWS Step function documentation and couldn't see any information about this. Can someone shed some light on this?
Thank you