title: ECS task not starting - STOPPED (CannotPullContainerError: “Error response from daemon request canceled while waiting for connection”
body: <p>I'm starting a task in ECS using Fargate and after being in PENDING for a little bit it ends up in STOPPED with the following error:</p>
  
  <pre><code>STOPPED (CannotPullContainerError: "Error response from daem
  </code></pre>
  
  <p>When I expand out the details I see</p>
  
  <pre><code>STOPPED (CannotPullContainerError: "Error response from daemon: Get https://id.dkr.ecr.ap-southeast-2.amazonaws.com/v2/: net/http: request canceled while waiting for connection"
  </code></pre>
  
  <p>with the reason</p>
  
  <pre><code>(Client.Timeout exceeded while awaiting headers)
  </code></pre>
  
  <p>So the task can't access the container for some reason, but I'm not sure what permission is missing and from what resource. I've read around a bit and the only real suggestion I've found is to add AssignPublicIp: ENABLED to the AwsvpcConfiguration but that didn't help.</p>