【发布时间】:2021-01-13 13:20:48
【问题描述】:
问题陈述:我在状态机中有 2 个 Lambda,并且我希望状态机调用失败,以防任何 Lambda 函数发生故障。在失败的情况下,我希望 stateMachine 失败,并将错误对象发送回
{"cause":"...", "error":"..."}
我可以通过引入一个状态来捕获错误,并将其发回。但是,AWS 将 StepFunction 调用标记为成功。我希望它被标记为失败。
按现状:我将 stateMachine 放在 API 网关后面,网关中定义了方法“startExecution”和“DescribeExecution”
PS:我已经经历过了 https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-handling-error-conditions.html
在此先感谢,非常感谢任何帮助
【问题讨论】:
标签: amazon-web-services error-handling aws-lambda aws-step-functions