I have a step function with a parallel state that has four branches (A, B, C, D) each with 3 Glue StartJobRun task states. In the case that branch A fails during the 1st task, how can I make sure the other branches continue with their tasks as long as they are successful?

1

There are 1 answers

3
Pooya Paridel On

As you mentioned in AWS Step Functions if one branch fails, the other branches will be immediately terminated and their results ignored. Step Functions will make a best-effort attempt to cancel any .sync tasks that are in progress, and stop executing any further states on any branch. If you want to let those other branches proceed to completion, you have to prevent any branch from failing. You can use Catch blocks on each state and transition to a Succeed (even when it was actually a failure). Then, after the Parallel completes, add a new state to do error handling to check which branches succeeded or failed.