- Newest
- Most votes
- Most comments
The output array ordering of a Step Functions Inline Map state is consistent with the input Items ordering, regardless of the MaxConcurrency setting.
When you use an Inline Map state to iterate over an input array with indexes [1, 2, 3, 4, 5], the output will always maintain the same order: [1, 2, 3, 4, 5]. This ordering is preserved even if you set MaxConcurrency to 40 or any other value.
The MaxConcurrency parameter controls how many iterations can run in parallel, but it does not affect the order of the results in the output array. Step Functions ensures that the output maintains the same sequence as the input, regardless of the execution order of individual iterations.
It's important to note that while the iterations may execute concurrently, Step Functions keeps track of the original order and assembles the final output array accordingly. This means you can rely on the output array having the same order as your input array, which is particularly useful when the order of processing is significant for your workflow.
So, in your example, you would not see an inconsistently ordered output like [2, 5, 3, 4, 1], even with concurrent execution. The Inline Map state guarantees that the output order matches the input order, providing predictability and consistency in your workflow results.
Sources
Using Map state in Inline mode in Step Functions workflows - AWS Step Functions
Map workflow state - AWS Step Functions
answered a year ago
Relevant content
asked a year ago
asked 3 years ago
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

Is this explicitly documented? The docs you referenced do not confirm if order is consistent.