我希望能够使用“步进功能”基于包含要映射到的任务的资源ARN的输入列表来动态映射到多个不同的任务。
理想情况下,输入看起来像:
{
"items": [
{ "arn": "ARN_1", "some_other_input": "blah" },
{ "arn": "ARN_2", "something_else": "doop" }
]
}
“地图”状态(或其他允许此操作的状态)将调用“ arn”键指定的每个任务,并将其余的输入传递给该任务。
我尝试使用"$$.Map.Item.Value.arn"
作为任务资源,但它抱怨Value is not a valid resource ARN
根据Context Object Data For Map States的文档,似乎这是不可能的,因为他们指出You must define parameters from the context object in the "Parameters" block of the main Map state, not within the states included in the "Iterator" section.
是否有解决此问题的好方法?
编辑:还应该提到,这些任务将需要较长时间才能运行,一旦它们全部完成,我需要将输出返回到step函数。