Why would a step function cancels itself when there are no errors
Another reason could be that it reaches a quota limit, like for instance if your state machine reaches 25K events in the event history it will get canceled.
In my case I tried to start an AWS Batch Job in my step functions using the arn:aws:states:::batch:submitJob.sync
resource type but provided not all parameters as Strings. But the additional Parameters
has to be a String to String map.
So in my case the failing payload was
{
"FieldName": 2
}
but has to be
{
"FieldName": "2"
}
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