aws ecr describe-repositories: Inspect ECR Repos in CI
List ECR repositories and read their registry URIs.
aws ecr describe-repositories returns metadata for ECR repositories, including the repositoryUri used in docker tag/push. In CI it confirms a repo exists before a push, or extracts the URI into a variable so workflows are not hardcoded.
Common flags
--repository-names- limit to specific repositories--query "repositories[0].repositoryUri"- extract the push URI--output text- emit plain text for shell capture--region- registry region
Example in CI
Resolve the repository URI to tag an image.
shell
aws ecr describe-repositories --repository-names my-app --query "repositories[0].repositoryUri" --output textCommon errors in CI
- An error occurred (RepositoryNotFoundException) - repo name does not exist in this region/account
- An error occurred (AccessDeniedException) - role lacks ecr:DescribeRepositories
- Unable to locate credentials - configure OIDC role auth
Key takeaways
- describe-repositories returns repositoryUri for docker tag and push.
- Use --query to extract the URI instead of hardcoding it in workflows.
- RepositoryNotFoundException usually means a wrong region or account.
Related guides
aws ecr get-login-password: Log Docker into ECR in CIaws ecr get-login-password returns a short-lived token to authenticate Docker with ECR. Learn the canonical p…
aws ecs update-service: Deploy to ECS in CIaws ecs update-service triggers a new ECS deployment with an updated task definition. Learn the force-new-dep…
aws ecs register-task-definition: New ECS Revision in CIaws ecs register-task-definition creates a new task definition revision from JSON. Learn the cli-input-json f…