- Newest
- Most votes
- Most comments
The documentation says: Exception: Distributed Map states cannot currently reference variables in outer scopes.
I am guessing that we plan to support out scope variables in the future also for distributed map state, and for that, to be future proof, we don;t allow the same names also now.
The documentation mentions that inner scope variables cannot use the same name as one defined in the outer scope: https://docs.aws.amazon.com/step-functions/latest/dg/workflow-variables.html#variable-scope
To help avoid common errors, a variable assigned in an inner scope cannot have the same name as one assigned in an outer scope
And in Map states, you do have access to outer scope variables:
Parallel and Map states have their own scope, but can access variables in outer scopes.~~
Update: Please see the update from Uri regarding the exception for Distributed Map. And please note that you can currently use ItemSelector to pass additional data from the parent execution into the input of the child executions
Thanks @ben-from-aws My bad for not reading the docs thoroughly enough.
Relevant content
asked 2 years ago
asked a year ago
- AWS OFFICIALUpdated 2 months ago

Thanks @Uri So if I understand correctly, the future intent is: