aws-ecr
Manage Docker container image repositories on AWS.
TLDR
Authenticate Docker to an ECR registry
SYNOPSIS
aws ecr command [options]
DESCRIPTION
aws ecr is the AWS CLI interface for Amazon Elastic Container Registry (ECR), a fully managed Docker container registry. ECR makes it easy to store, manage, and deploy Docker container images with integration into Amazon ECS and EKS.
ECR provides private repositories with IAM-based access control, automatic image scanning for vulnerabilities, cross-region and cross-account replication, and lifecycle policies for image retention management.
COMMANDS
get-login-password
Get authentication token for Docker logincreate-repository
Create a new image repositorydescribe-repositories
List repository detailslist-images
List images in a repositorydescribe-images
Get detailed image informationbatch-delete-image
Delete one or more imagesput-lifecycle-policy
Set image retention rulesstart-image-scan
Initiate vulnerability scanningdescribe-image-scan-findings
Get scan resultsput-replication-configuration
Configure cross-region replication
CAVEATS
Authentication tokens expire after 12 hours. Image tags are mutable by default; enable tag immutability for production. Lifecycle policies run asynchronously and may take time to delete images. Image scanning must be enabled per repository or at registry level.
HISTORY
Amazon ECR launched in December 2015 alongside Amazon ECS. Cross-region replication was added in 2020, and enhanced scanning powered by Amazon Inspector launched in 2021. ECR Public for public container images became available in 2020.
