Title: toomanyrequests: Rate exceeded ONLY when using Docker pull from ECR
Tags: docker;amazon-ecr
Question: I am using the ECR Public Gallery to pull some images in a CI pipeline which runs frequently. I get this error from time to time, but what bothers me is that it only happens when using ```docker```. When I use ```podman``` to pull the images, it never complains about any quota limits.
```# docker pull public.ecr.aws/docker/library/alpine:latest
latest: Pulling from docker/library/alpine
toomanyrequests: Rate exceeded
```
And even sometimes, this error appears at the end of the pull:
```# docker-compose pull
Pulling nginx   ... 

Pulling haproxy ... 


Pulling haproxy ... pulling from docker/library/haproxy

Pulling nginx   ... pulling from docker/library/nginx

Pulling nginx   ... pulling fs layer

Pulling nginx   ... pulling fs layer

Pulling nginx   ... pulling fs layer

Pulling nginx   ... pulling fs layer

Pulling nginx   ... pulling fs layer

Pulling nginx   ... pulling fs layer

Pulling nginx   ... waiting

Pulling nginx   ... waiting

Pulling nginx   ... waiting

Pulling nginx   ... downloading (100.0%)

Pulling nginx   ... verifying checksum

Pulling nginx   ... download complete

Pulling nginx   ... downloading (1.0%)

Pulling nginx   ... downloading (1.0%)

...

Pulling nginx   ... extracting (94.1%)

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... pull complete

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... pull complete

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... pull complete

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... pull complete

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... extracting (100.0%)

Pulling nginx   ... pull complete

Pulling nginx   ... digest: sha256:2bcabc23b45489fb08...

Pulling nginx   ... status: downloaded newer image fo...

Pulling nginx   ... done

ERROR: for haproxy  toomanyrequests: Rate exceeded
ERROR: toomanyrequests: Rate exceeded
```
Then, I went ahead and created a public registry under my account thinking that I would have better control over these limits and I pushed all the images I needed:
```docker pull public.ecr.aws/<my_repo_id&gt;/alpine:latest```
But I ran into the same problem.
I thought that since it's under my account, I could change the Rate limits, but when on the quotas management in AWS UI I bumped into:
```Rate of unauthenticated image pulls``` -&gt; ```1``` and it's &quot;Not adjustable&quot;
Which is also what the docs say: https://docs.aws.amazon.com/AmazonECR/latest/public/public-service-quotas.html
This triggers several questions:

What does that ```1``` mean? 1 pull per second?
Why does it apply only when I use docker and not with podman?
How can I change this quota?


Comment: Did you login with `docker login`?

Comment: No, I want it to be a public registry without login.


Here is another answer: &quot;Rate of unauthenticated image pull&quot; is per second (verified with AWS support).
It looks like you're pulling two images with your docker-compose so that is why you're getting this error.
Podman probably doesn't do this concurrently I'm guessing (I don't use podman).
Your best bet would be to use either a private registry with authenticated requests and/or the pull-through cache.

Comment for this answer: Thanks for your answer. I have created a registry using `registry:2` container image on a private VM. It doesn't have pull limits but it has other disadvantages vs other public registries.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2022:00:06/10/22', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<docker><amazon-ecr>', 'Title': 'toomanyrequests: Rate exceeded ONLY when using Docker pull from ECR', 'ViewCount': 234, 'id': 72570095, 'user_AboutMe': None, 'user_AccountId': 6071370.0, 'user_DisplayName': 'hosselausso', 'user_Reputation': 827.0, 'user_Views': 46.0, 'user_id': 4740087.0}}