[ECR] [request]: Server-Side Search, Sort & Filters
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
**Tell us about your request**
The CLI supports pagination on the `aws ecr describe-repositories` call ([docs](https://docs.aws.amazon.com/cli/latest/reference/ecr/describe-repositories.html)) but I would like support for filtering, searching and sorting on the ECR APIs. The syntax would be similar to the EC2 `describe-instances` filters ([docs](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options)).
```bash
$ # Return the repos that are tagged as part of the alpha project.
$ aws ecr describe-repositories --filters 'Name=tag:Project,Values=alpha'
$ # Search for a repo that starts with "dev" (regex)
$ aws ecr describe-repositories --filters 'Name=repositoryName,Values=^dev*'
$ # Sort the images in the my-app repository by imagePushedAt
$ aws ecr describe-images --repository-name my-app --sortby imagePushedAt
```
**Which service(s) is this request for?**
ECR
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
With the default limit of 10000 repos and 10000 images ([docs](https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)), being able to sort, filter and search for images and repos would be extremely useful.
**Are you currently working around this issue?**
Currently, the whole list needs to be filtered, sorted and searched client-side via the `--query` option, `jq` or a custom script using the SDKs.
Contributor guide
Research direction
Start with the linked AWS ECR and EC2 CLI documentation and compare the requested describe-repositories and describe-images behavior. The payload names no repository files, tests, or implementation entry points, so the first task is locating where these ECR APIs and CLI options are defined. Done means ECR supports server-side filtering, searching, and sorting for repositories and images.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100