[英]AWS step functions nested map steps
目前是否有解決方案可用於在 AWS 步驟函數中的另一個 map 步驟中使用 map 步驟?
我目前正在嘗試這樣做,但我得到了這個問題的確切錯誤: AWS step functions - Nested Map type
但是我一直找不到解決方案,我到處搜索。
是的,您可以在 map 中添加嵌套的 map 並且您可以根據需要重復此模式。 這是一個簡單的例子:
{
"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
}
}
}
}
}
}
}
}
}
為了方便您,我在Data1
和Data2
步驟中對 arrays 進行了硬編碼,這樣您就可以在不傳遞任何執行輸入的情況下執行我的示例。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.