Docker Hub: Rate Limits

Troubleshooting: Docker Hub Rate Limits During Build

Docker Hub has limits on the amount of pulls unauthenticated users can do. This often affects AWS users of CodeBuild because it's a shared service and many other AWS users are pulling from Docker Hub too.

This typically manifests itself with failing builds due to the following error:

toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: [](

There are two solutions to this problem.


  • Option 1: Create a Docker Hub (opens in a new tab) account and add the DOCKER_USERNAME and DOCKER_PASSWORD environment variables in Flightcontrol, learn more on how to add environment variables to your project here
  • Option 2: Use AWS Elastic Container Registry (ECR) public images instead of using the Docker Hub. ECR supports unlimited free pulls from AWS resources, check the ECR Public Gallery (opens in a new tab) which includes all the major docker providers