title: Fork/Join on StepFunction Map Steps with failures
body: <p>I have a step function that starts with many parallel steps (each parallel step is a lambda invocation) and then a finalize step that does some final processing.  </p>
  
  <p>It can be visualized here (a redacted version of the state function definition is given below as well).  I know you can add try/catch logic around the parallel steps but if my understanding is correct that doesn't stop the other parallel steps from continuing and doesn't send them all to a different state.</p>
  
  <p>Ideally what I'd like is if any of the parallel steps fail for any reason, all current steps would be cancelled (as well as future ones) and they would never go to the Finalize stage but instead to a third state (call it Error Recovery) for a different execution.  Is this work flow possible?  And if so, is it guaranteed that all the Parallel Steps would have been stopped before the Recovery state is entered?</p>
  
  <p><a href="https://i.stack.imgur.com/7rfoa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7rfoa.png" alt="Step Function DAG"></a></p>
  
  <p><strong>Step Function Definition</strong></p>
  
  <pre><code>{
    "Comment": "An example of the Amazon States Language using a map state to process elements of an array with a max concurrency of 2.",
    "StartAt": "Map",
    "States": {
      "Map": {
        "Type": "Map",
        "ItemsPath": "$.items",
        "Parameters": {
          ...
        },
        "MaxConcurrency": 2,
        "Next": "Finalize",
        "Iterator": {
          "StartAt": "Parallel Step",
          "States": {
            "Parallel Step": {
              "Type": "Task",
              "Resource": "arn:aws:states:::lambda:invoke",
              "Parameters": {
                "FunctionName": "arn:aws:lambda:us-east-1:&lt;&gt;:function:lambda-parallel-step:$LATEST",
                "Payload": {
                  "Input.$": "$"
                }
              },
              "OutputPath": "$.Payload",
              "End": true
            }
          }
        }
      },
      "Finalize": {
        "Type": "Pass",
        "End": true
      }}}
  </code></pre>