title: What should I do when Fargate runs out of capacity?
body: <p>I'm kicking off a single ECS Fargate task with a command such as:</p>
  
  <pre><code>aws ecs run-task --cluster Fargate \
   --task-definition $ECR_REPO-run-setup 
   --overrides file:///tmp/ecs-overrides-db-migrate.txt \
   --count 1 --launch-type FARGATE \
   --network-configuration "awsvpcConfiguration={subnets=[$PUBLIC_SUBNET_1, $PUBLIC_SUBNET_2],securityGroups=[$FARGATE_SG],assignPubli cIp=ENABLED}"
  </code></pre>
  
  <p>There are no ECS services, tasks or instances at all running in my account at the moment.  This is the response I get back:</p>
  
  <pre><code>{
      "failures": [
          {
              "reason": "Capacity is unavailable at this time. Please try again later or in a different availability zone"
          }
      ],
      "tasks": []
  }
  </code></pre>
  
  <p>I don't even see a way to specify a different availability zone for a Fargate Task? </p>
  
  <p>If I should just retry, how long should I wait before retries?</p>