I have a step function with three steps:
- setup
- start & wait for finish of another step function
- finish
I pass some input from the first step into the second step, but I don't use all fields as inputs to the child step function, but I want to pass all of that data into step 3. I thought I could do this by specifying OutputPath, but it doesn't work and still passes through the output of the child step function to step 3.
stateMachine: {
StartAt: 'setup',
States: {
setup: {
Type: 'Task',
TimeoutSeconds: 3600,
Retry: [
{
ErrorEquals: ['States.ALL'],
MaxAttempts: 2,
},
],
Resource: setupFn,
Next: 'child_sfn',
},
child_sfn: {
Type: 'Task',
TimeoutSeconds: 3600,
Retry: [
{
ErrorEquals: ['States.ALL'],
MaxAttempts: 2,
},
],
Catch: [
{
ErrorEquals: ['States.ALL'],
Next: 'sfn_catch',
},
],
Parameters: {
StateMachineArn: 'mySfnArn',
Input: {
'myInput1.$': '$.myInput1',
},
},
OutputPath: '$.',
Resource: 'arn:aws:states:::states:startExecution.sync',
Next: 'finish',
},
finish: {
Type: 'Task',
TimeoutSeconds: 3600,
Retry: [
{
ErrorEquals: ['States.ALL'],
MaxAttempts: 2,
},
],
Resource: finishFn,
End: true,
},
sfn_catch: {
Type: 'Task',
TimeoutSeconds: 3600,
Resource: stepFunctionCatch,
End: true,
},
},
}