Reputation: 2025
I have a step function with the following definition:
{
"StartAt": "A",
"States": {
"A": {
"Type": "Task",
"Resource": "do something",
"Next": "B"
},
"B": {
"Type": "Task",
"Resource": "do something",
"End": true
}
}
}
The problem is the input for the state B. I need it to be the same as the input for the state A. Currently however the input for the step B is the output of the step A. Taken into account that step A in fact calls a different step function or performs a DynamoDB operation (no lambda involved), there's not much I can do about the output of that step, but the step B still needs to receive the same input as step A originally did. How can I define this?
Upvotes: 1
Views: 336
Reputation: 43661
You can execute tasks in Parallel, something along the lines:
"A_And_B":{
"Type":"Parallel",
"Branches":[
{
"StartAt":"A",
"States":{
"A":{
"Type":"Task",
"Resource":"do something",
"Next":"B"
}
}
},
{
"StartAt":"B",
"States":{
"B":{
"Type":"Task",
"Resource":"do something",
"End":true
}
}
}
],
"Next":"NextState"
}
Upvotes: 0
Reputation: 4606
Set ResultPath: null
in state A
to discard the result and leave the state unchanged.
Upvotes: 3