title: Pushing an image to ECR, getting "Retrying in ... seconds"
body: <p>I recently created a new repository in AWS ECR, and I'm attempting to push an image. I'm copy/pasting the directions provided via the &quot;View push commands&quot; button on the repository page. I'll copy those here for reference:</p>
  <ol>
  <li><code>aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 123456789.dkr.ecr.us-west-2.amazonaws.com</code></li>
  </ol>
  <p>(&quot;Login succeeded&quot;)</p>
  <ol start="2">
  <li><p><code>docker build -t myorg/myapp .</code></p>
  </li>
  <li><p><code>docker tag myorg/myapp:latest 123456789.dkr.ecr.us-west-2.amazonaws.com/myorg/myapp:latest</code></p>
  </li>
  <li><p><code>docker push 123456789.dkr.ecr.us-west-2.amazonaws.com/myorg/myapp:latest</code></p>
  </li>
  </ol>
  <p>However, when I get to the <code>docker push</code> step, I see:</p>
  <pre><code>&gt; docker push 123456789.dkr.ecr.us-west-2.amazonaws.com/myorg/myapp:latest
  The push refers to repository [123456789.dkr.ecr.us-west-2.amazonaws.com/myorg/myapp]
  
  a53c8ed5f326: Retrying in 1 second 
  78e16537476e: Retrying in 1 second 
  b7e38d172e62: Retrying in 1 second 
  f1ff72b2b1ca: Retrying in 1 second 
  33b67aceeff0: Retrying in 1 second 
  c3a550784113: Waiting 
  83fc4b4db427: Waiting 
  e8ade0d39f19: Waiting 
  487d5f9ec63f: Waiting 
  b24e42eb9639: Waiting 
  9262398ff7bf: Waiting 
  804aae047b71: Waiting 
  5d33f5d87bf5: Waiting 
  4e38024e7e09: Waiting
  EOF
  </code></pre>
  <p>I'm wondering if this has something to do with the permissions/policies associated with this repository. Right now there are no statements attached to this repository. Is that the missing part? If so, what would that statement look like? I've tried this, but it had no effect:</p>
  <pre><code>{
    &quot;Version&quot;: &quot;2008-10-17&quot;,
    &quot;Statement&quot;: [
      {
        &quot;Sid&quot;: &quot;AllowPutImage&quot;,
        &quot;Effect&quot;: &quot;Allow&quot;,
        &quot;Principal&quot;: {
          &quot;AWS&quot;: &quot;arn:aws:iam::123456789:root&quot;
        },
        &quot;Action&quot;: &quot;ecr:PutImage&quot;
      }
    ]
  }
  </code></pre>
  <p>Bonus Points:
  I eventually want to use this in a CDK CodeBuildAction. I was getting the same error as above, so I check to see if I was getting the same result in my local terminal, which I am. So if the policy statement needs to be different for use in the CDK CodeBuildAction those details would be appreciated as well.</p>
  <p>Thank you in advance for and advice.</p>