aws ecr describe-images: Tags, Digests & CI Errors
Inspect the images in an ECR repository - tags, digests, and push times.
aws ecr describe-images lists the images in an ECR repository with their tags, digests, sizes, and push times. It is how CI confirms a tag exists or finds the digest to deploy.
What it does
aws ecr describe-images --repository-name <repo> returns image metadata: imageTags, imageDigest, imagePushedAt, and size. With --image-ids you can target a specific tag or digest, and --query extracts just the field you need (e.g. the digest for a digest-pinned deploy).
Common usage
# List all images in a repo
aws ecr describe-images --repository-name my-app
# Get the digest of a specific tag
aws ecr describe-images --repository-name my-app \
--image-ids imageTag=latest \
--query "imageDetails[0].imageDigest" --output text
# Newest tags first
aws ecr describe-images --repository-name my-app \
--query "reverse(sort_by(imageDetails,&imagePushedAt))[].imageTags"Common error in CI: RepositoryNotFoundException / ImageNotFoundException
The command fails with "RepositoryNotFoundException ... does not exist in the registry" (wrong repo name or region/account) or "ImageNotFoundException" when --image-ids references a tag that was never pushed. Fix: confirm the repository name and region match where you pushed, and verify the tag exists before pinning a deploy to it. Reads require ecr:DescribeImages on the repository. Pin production deploys to imageDigest (immutable) rather than a mutable tag like latest.
Key options
| Option | Purpose |
|---|---|
| --repository-name | Repository to inspect |
| --image-ids imageTag= / imageDigest= | Target a specific image |
| --query | Extract tags/digests/timestamps |
| --filter tagStatus=UNTAGGED | Find untagged (orphaned) images |