AWS Step Function not falling into catch block

Viewed 198

I'm running a state machine that has a map state and this map iterate over items of the type task which trigger other state machines. Now, when the child state machines fail, the parent state machine doesn't catch the error even though I've configured wildcard(States.ALL) for any type of error. What am I, doing wrong? How to catch the error from the child state machine?

{
  "StartAt": "Child",
  "States": {
    "Child": {
      "Type": "Map",
      "MaxConcurrency": 15,
      "ItemsPath": "$.child_items",
      "Iterator": {
        "StartAt": "Execute child state machine",
        "States": {
          "Execute forecast state machine": {
            "Type": "Task",
            "Resource": "arn:aws:states:::states:startExecution.sync:2",
            "Parameters": {
              "StateMachineArn": "${ChildStateMachineArn}",
              "Input": {
                "epoch.$": "$.epoch",
                "execution_date.$": "$.execution_date"
              }
            },
            "End": true
          }
        }
      },
      "Catch": [
        {
          "ErrorEquals": [
            "States.ALL"
          ],
          "Next": "Failure"
        }
      ],
      "Next": "Next Module",
      "ResultPath": null
    },
    "Next Module": {
      "Type": "Map",
      "MaxConcurrency": 10,
      "ItemsPath": "$.next_module",
      "Iterator": {
        .
        .
        .
      },
      "Next": "Success",
      "ResultPath": null
    }
        .
        .
        .
        .
        .
        .
  }
}
0 Answers
Related