title: AWS ECS Fargate CannotPullContainerError: ref pull has been retried failed to copy: httpReadSeeker: failed open: unexpected status code
body: <p>From ECS console I started to see this issue</p>
  <p><a href="https://i.stack.imgur.com/UfnvL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UfnvL.png" alt="enter image description here" /></a></p>
  <p>I think I understand pretty well the cause of this. ECS pulls these images as an anonymous user, since I haven't provided any credentials, and since the task was set to run every 5 minutes it was hitting the anonymous quota. No big deal, I set the task to run every 10 minutes and for now the problem is solved.</p>
  <p>What drives me nuts is:</p>
  <ul>
  <li>From CloudWatch console you can see that the task was executed. If I graph the number of executions I will see a chart with data points every 5 minutes. This is wrong to me, because in order to execute the task ECS first needs to pull something, and it can't, therefore there is no execution.</li>
  <li>I can't find the error <code>(CannotPullContainerError: ref pull has been retried 1 time(s): failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/amazon/aws-for-fluent-bit/manifests/sha256:f134723f733ba4f3489c742dd8cbd0ade7eba46c75d574...)</code> in any CloudWatch log stream.</li>
  </ul>
  <p>I need to be able to monitor for this error. I spot checked it because I found it by chance since I was looking into the console. How can I monitor for this?</p>
  <p>FYI, I use Data Dog too for log ingestion. Maybe that can help?</p>