Yes, you can add nested map inside map and you can repeat this pattern as much as you want.
Here is a simple example:
{
"StartAt": "Data1",
"States": {
"Data1": {
"Type": "Pass",
"Result": {
"array1": [0,1]
},
"Next": "Map1"
},
"Map1": {
"Type": "Map",
"ItemsPath": "$.array1",
"ResultPath": "$.array1",
"MaxConcurrency": 2,
"End": true,
"Iterator": {
"StartAt": "Data2",
"States": {
"Data2": {
"Type": "Pass",
"Result": {
"array2": [0,1,2]
},
"Next": "Map2"
},
"Map2": {
"Type": "Map",
"ItemsPath": "$.array2",
"ResultPath": "$.array2",
"MaxConcurrency": 2,
"End": true,
"Iterator": {
"StartAt": "Wait",
"States": {
"Wait": {
"Type": "Wait",
"Seconds": 1,
"End": true
}
}
}
}
}
}
}
}
}
To make it simple for you, I hardcoded arrays in Data1 and Data2 steps so you could execute my example without passing any execution input.
