使用从嵌套Step函数返回的Output JSON数据 [英] Using the Output JSON data returned from a nested Step Function
问题描述
我正在使用嵌套的阶梯函数(SF)创建POC,并且遇到了以下问题.
Im creating a POC with nested Step Functions (SF) and have hit the following issue.
- I have SF A that has a sync task that starts the execution of SF B (using the recently announced syntax) & waits for it to complete.
- SF B returns a valid JSON output
- In SF A, I can see (from the output of the task that calls SF B) the correct fields returned. e.g Status, ExecutionArn as well as the Output.
- I then want to execute a Choice Task in SF A that uses a field returned from SF B. However the json in the Output field returned from SF B is escaped json, so the jsonPath isn't able to extract a field from the output data from the nested json.
在这种情况下是否存在某些缺失或推荐的方法?我可以用lambda或其他方式处理"转义的json字符串,但可以在Choice任务中使用它……但这有点使嵌套SF工作流的意义有些逊色.
Is there something im missing or a recommended approach to this scenario? I could "process" the escaped json string in a lambda or something but using it in the Choice task... but that kinda defeats the point of the nested SF workflow somewhat.
任何帮助表示赞赏.
推荐答案
由于您提出了问题,因此不确定它是新的,但是答案在您提供的链接中: 使用"arn:aws:states ::: states:startExecution.sync:2"而不是"arn:aws:states ::: states:startExecution.sync"
Not sure it's new since you asked the question but the answer is in the link you provided: Use "arn:aws:states:::states:startExecution.sync:2" in the task resource field instead of "arn:aws:states:::states:startExecution.sync"
这篇关于使用从嵌套Step函数返回的Output JSON数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!