Reputation: 2667
I checked this guide AWS CLI For Step Functions, but it only describe about an State Machine's execution is passing or not, but no way to know which exact Activity fails and which exact Activity passes, is there a quick way to find that out?
The UI of Step Function has that visually showing which exact Activity fails, but not with the CLI.
Upvotes: 1
Views: 3044
Reputation: 1391
You asked which exact Activity fails, but based on your question I think you are looking to find which state in your state machine fails.
In AWS console, Step Functions visually showing which exact State fails based on the data from Execution History. To do it from CLI you can use get-execution-history command like this:
aws stepfunctions get-execution-history --execution-arn <execution-arn> --reverse-order --max-items 2
--reverse-order Lists events in descending order of their timeStamp, and is useful because the fail events are the last events in execution history.
--max-items Used because the last event is for ExecutionFailed event and the events before that is for state Fail event. You can increase it to see more events.
Upvotes: 2