ecr: repository lifecycle rules do not support all possible rules
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
When defining ECR repository lifecycle policies, currently it's only possible to specify maxImageAge or maxImageCount. In the AWS console it's also possible to specify maximum days since last pull or since the image has been archived, also the action taken can be configured -- delete or archive.
### Use Case
I need some way to cleanup our development image registry; we have no reason to keep old images, being able to remove images that weren't pulled in a while would be very helpful.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.236.0
### AWS CDK CLI version
2.1104.0
### Environment details (OS name and version, etc.)
MacOS 26.2 (arm)
Contributor guide
Research direction
Start by locating the ECR repository lifecycle policy definitions and their tests, then trace how maxImageAge and maxImageCount are represented and synthesized. Compare that path with the AWS-supported rules for time since last pull, archived images, and delete or archive actions. Done means the supported lifecycle options can be defined and emitted correctly, with tests covering them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100