title: AWS Blue/Green CodeDeploy to ECS install lifecycle event timesout
body: <p>As the title suggests, the blue/green deployment for ecs never finishes because the <strong>install</strong> lifecycle event never finishes and timesout.</p>
  
  <p>This is the picture showing that:
  <a href="https://i.stack.imgur.com/KY9a5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KY9a5.png" alt="enter image description here"></a>
  The appspec file:</p>
  
  <pre><code>version: 0.0 
  Resources: 
    - TargetService: 
        Type: AWS::ECS::Service 
        Properties: 
          TaskDefinition: &lt;TASK_DEFINITION&gt; 
          LoadBalancerInfo: 
            ContainerName: "WordpressContainer" 
            ContainerPort: 80 
  </code></pre>
  
  <p>The taskdef file:</p>
  
  <pre><code>{ 
      "executionRoleArn": "arn:aws:iam::336636872471:role/WordpressPipelineExecutionRole", 
      "containerDefinitions": [ 
          { 
              "name": "WordpressContainer", 
              "image": "&lt;IMAGE1_NAME&gt;", 
              "essential": true, 
              "portMappings": [ 
                  { 
                      "hostPort": 80, 
                      "protocol": "tcp", 
                      "containerPort": 80 
                  } 
              ] 
          } 
      ], 
      "requiresCompatibilities": [ 
          "FARGATE" 
      ], 
      "networkMode": "awsvpc", 
      "cpu": "256", 
      "memory": "512", 
      "family": "wordpress" 
  } 
  </code></pre>
  
  <p>I am pushing a bare-bones wordpress docker image to ECR which triggers a pipeline but it stucks on <em>CodeDeploy</em>.</p>
  
  <p>Any ideas what is happening?
  How am I even supposed to debug that?</p>
  
  <p>P.S. it timed-out in 60 minutes with the message:</p>
  
  <blockquote>
    <p>The deployment timed out while waiting for the replacement task set to
    become healthy. This time out period is 60 minutes.</p>
  </blockquote>