24

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?

ken
  • 8,763
  • 11
  • 72
  • 133
  • Take a look at execution history (list of events at the bottom of a page with execution). Especially check what happend at the end. It's possible that your execution has reached timeout or maximum number of state transitions. – Marcin Sucharski Jun 03 '18 at 23:12
  • i faced the same problem and dumbfounded for a while. Check the execution event history, to the step where the task failed. i found out that my task failed to due to improper mentioning of a json key. I was able to resolve it!! – pyhotshot Apr 27 '20 at 20:31

3 Answers3

17

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

Hillel Solow
  • 196
  • 2
  • 3
  • I have been off on other adventures recently but I'll have a look at this once I'm back on this project. Sounds highly plausible. – ken Mar 15 '19 at 22:39
3

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.

mim
  • 1,301
  • 14
  • 24
1

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"
}
disco crazy
  • 31,313
  • 12
  • 80
  • 83