Skip to content
Latchkey

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

Terminal
# 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

OptionPurpose
--repository-nameRepository to inspect
--image-ids imageTag= / imageDigest=Target a specific image
--queryExtract tags/digests/timestamps
--filter tagStatus=UNTAGGEDFind untagged (orphaned) images

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →