Search code examples
aws-step-functions

Why would a step function cancels itself when there are no errors


I have a step function (illustrated below) and I was working out the few remaining issues when all of a sudden I hit a rather unexpected result:

  • All tasks that have completed, completed successfully without error
  • All remaining tasks simulateously cancel themselves (also no error)

enter image description here

I'm a bit dumbfounded. Has anyone seen this? Does anyone know how I'd go about troubleshooting it?


Solution

  • This may not match your case, but this happens in step functions when you have a Choice state, and the Variable you are referencing is not actually in the state input.

    The documentation says:

    Note:

    You must specify the $.type field. If the state input doesn't contain the $.type field, the execution fails and an error is displayed in the execution history.

    but from my experience, you get a Cancelled state.

    Have a look here for more info: AWS Step Functions - Choice