我有两个Lambda函数:第一个运行并为函数2 ex运行特定的运行时间列表,例如{“ 2020-09-04T01:59:00Z”,“ 2020-09-04T02:59:00Z” ,“ 2020-09-04T03:59:00Z”,“ 2020-09-04T04:59:00Z”}
我只能使用一个输入来创建它: 例如:
{
"Comment": "Fixtures Wait state",
"StartAt": "FirstState",
"States": {
"FirstState": {
"Type": "Task",
"Resource": "arn:aws:lambda:${aws_region}:${aws_account_id}:function:hello",
"ResultPath": "$.first",
"Next": "wait_using_timestamp_path"
},
"wait_using_timestamp_path": {
"Type": "Wait",
"TimestampPath": "$.expirydate",
"Next": "wait_using_seconds_path"
},
"FinalState": {
"Type": "Task",
"Resource": "arn:aws:lambda:${aws_region}:${aws_account_id}:function:hello",
"End": true
}
}
}
是否可以处理所有输入?还是我想错了?
答案 0 :(得分:1)
Map
状态可用于在输入数组上执行迭代器。在执行第一个Lambda任务后,将要对输出数组中的每个项目执行的步骤置于Map状态。
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-map-state.html