Let say part of my Step Function looks like next:
"ChoiceStateX": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.value",
"NumericEquals": 0,
"Next": "ValueIsZero"
}
],
"Default": "DefaultState"
},
"ValueIsZero": {
"Type" : "Task",
"Resource": "arn:aws:lambda:******:function:Zero",
"Next": "NextState"
},
"DefaultState": {
"Type" : "Task",
"Resource": "arn:aws:lambda:******:function:NotZero",
"Next": "NextState"
}
Let assume that input to this state is:
{
"value": 0,
"output1": object1,
"output2": object2,
}
My issue is that I have to pass output1 to ValueIsZero state and output2 to DefaultState. I know that it is possible to change InputPath in ValueIsZero and DefaultState states. But this way isn't acceptable for me because I am calling these states from some other states also.
I tried to modify ChoiceStateX state like next:
"ChoiceStateX": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.value",
"NumericEquals": 0,
"OutputPath": "$.output1",
"Next": "ValueIsZero"
}
],
"Default": "DefaultState"
}
I got next error in this case: Field OutputPath is not supported.
How is it possible to implement this functionality?
PS: In the current moment I am using 'proxy' states between ChoiceStateX and ValueIsZero/DefaultState where modifying the output.
I have checked:
but haven't found a solution yet.