WeCanBeFriends
WeCanBeFriends

Reputation: 691

Aws Step function parallel states

When the parallel states of a step function complete, assuming they both produce arrays of values, will the order be guaranteed in the final output, and is there any way to split it such that I know which set of values came from one parallel task?

Upvotes: 1

Views: 3408

Answers (1)

Daryl T
Daryl T

Reputation: 125

https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-parallel-state.html

I was just exploring this, and based off the example in the link above, the resulting array from the parallel task is ordered by the branch configuration order.

The input to the step function is [ 3, 2 ] and the first defined branch of the parallel task adds the two numbers, and the second subtracts the two numbers.

The output from the Parallel task is [ 5, 1 ], i.e. [ 3+2, 3-2 ], therefore ordering the results by branch configuration order.

Upvotes: 3

Related Questions