ECR repository should have a lifecycle policy to expire old images
What it checks
ECR repository: no lifecycle policy is configured.
Where it applies
Terraform: aws_ecr_repository
CloudFormation: AWS::ECR::Repository
How to fix it
- Add an aws_ecr_lifecycle_policy that expires untagged images after 14 days and limits tagged images to the most recent 30.
Frameworks
- AWS FSBP ECR.3
These mappings are advisory, not an attestation of compliance.