如何触发步骤功能并获得状态失败或成功

how to trigger step function and get the status failed or success

我已经能够使用 awscli 开始执行,但我需要能够知道何时完成或结果成功才能进入管道中的下一步。

aws stepfunctions start-execution --state-machine-arn arn:aws:states:us-west-2:2xx244xxxx:stateMachine:SamplePipeOrchestration-ftpiles --name SamplePipeOrchestration-ftpiles --input {} --region us-west-2 --profile sampledev

您必须开发自己的 waiter 以循环形式迭代查询(例如每 10 秒)您的执行状态(例如使用 describe-execution 并检查成功或失败的完成。