Why this happens
Docker Hub limits unauthenticated image pulls per source IP address. Builds run on EC2 instances in your AWS account, and instances in private subnets share the VPC’s NAT gateway — so every build in the environment counts against the same IP. A busy team, or a burst of preview environments, exhausts the anonymous quota quickly. At the time of writing the anonymous limit is 100 pulls per 6 hours per IPv4 address (200 for an authenticated free account); check Docker Hub usage and limits for the current numbers.Fix: pull from the ECR Public mirror
AWS mirrors the Docker Hub official images on ECR Public, with no rate limits for pulls from inside AWS. Change the registry prefix in yourDockerfile:
public.ecr.aws/docker/library/<image>. Browse the ECR Public Gallery to confirm a tag exists.
This is the recommended fix: no credentials, no secrets to rotate, and pulls stay on the AWS network.
If you build with Railpack instead of a Dockerfile, the base images Railpack generates already avoid Docker Hub.
Fix: authenticate to Docker Hub
If you need images that are not mirrored — a vendor image published only on Docker Hub, for example — authenticate the pull. Authenticated free accounts get a much higher limit, and paid accounts are unlimited. ADockerfile cannot log in before its own FROM line, so for build-time pulls the practical route is to copy the image into your own ECR repository (see below) and pull from there.
For run-time pulls — a module that deploys an existing image with build_source: image_registry — set image_registry_credentials_secret_arn on the module to a Secrets Manager secret in the ECS repository-credentials format:
rvn-ecs-web for the input reference.