Skip to content
Latchkey

GHCR vs Amazon ECR: Which Registry for CI?

GHCR integrates seamlessly with GitHub Actions; ECR integrates with AWS deploys and IAM - your deploy target usually decides.

GitHub Container Registry (GHCR) stores images alongside your GitHub repos with built-in Actions auth. Amazon ECR is AWS’s registry, tightly integrated with IAM and AWS compute (ECS, EKS, Lambda).

GHCRAmazon ECR
Auth in CIGITHUB_TOKEN built-inAWS IAM / OIDC
Tightest integrationGitHub ActionsAWS compute (ECS/EKS/Lambda)
Cost modelGitHub plan storage/egressAWS storage + data transfer
Pull speed to AWSOver the internetIn-region, fast to AWS
Best forGitHub-centric workflowsAWS deployments

In CI

Pushing and pulling via GHCR with the built-in GITHUB_TOKEN is frictionless inside GitHub Actions. ECR is the natural choice when you deploy to AWS: images live in-region next to ECS/EKS/Lambda for fast, IAM-scoped pulls, and OIDC from Actions to AWS avoids long-lived keys. The deciding factor is usually where the image gets deployed.

Choosing for pipelines

Deploying to AWS compute: ECR for in-region pulls and IAM. GitHub-centric workflows or non-AWS targets: GHCR for built-in auth. Some teams build once and push to both - GHCR for sharing, ECR for AWS deploys.

The verdict

Deploying on AWS: ECR for in-region, IAM-scoped pulls. GitHub-centric or non-AWS: GHCR for built-in Actions auth. Let the deploy target choose, and consider pushing to both.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card