title: AWS StepFunction - Failed to update state machine
body: <p>I had a working StepFunction state machine with 4 steps triggering 4 Lambdas.</p>
  
  <p>Since one of the steps is going to be a longer running task, I decided to turn one of the Lambdas into a Fargate task.</p>
  
  <p>After configuring ECS and Fargate task, I tried updating my state machine definition, but got the error: <code>Failed to update state machine.</code> without any additional messages.</p>
  
  <p>My state machine definition seems to be valid, here it is, just without actual ARNs:</p>
  
  <pre><code>{
    "Comment": "My Workflow",
    "StartAt": "Step1",
    "States": {
      "Step1": {
        "Type": "Task",
        "Resource": "copy-pasted-arn-of-lambda",
        "Next": "Step2"
      },
      "Step2": {
        "Type": "Task",
        "Resource": "arn:aws:states:::ecs:runTask.sync",
        "Parameters": {
          "LaunchType": "FARGATE",
          "Cluster": "copy-pasted-arn-of-cluster",
          "TaskDefinition": "copy-paster-arn-of-task-definition",
          "Overrides": {
            "ContainerOverrides": [
              {
                "Name": "container-name",
                "Command.$": "$.commands"
              }
            ]
          }
        },
        "Next": "Step3",
        "Catch": [
          {
            "ErrorEquals": [
              "States.ALL"
            ],
            "Next": "Step4"
          }
        ]
      },
      "Step3": {
        "Type": "Task",
        "Resource": "copy-pasted-arn-of-lambda",
        "Next": "Step4"
      },
      "Step4": {
        "Type": "Task",
        "Resource": "copy-pasted-arn-of-lambda",
        "End": true
      }
    }
  }
  </code></pre>
  
  <p>This is the screenshot of the error:
  <a href="https://i.stack.imgur.com/O3CL0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/O3CL0.png" alt="enter image description here"></a></p>
  
  <p>Any ideas? I've been banging my head on this one for a while.</p>