Created
October 1, 2023 18:03
-
-
Save akullpp/f5ea30d8cafd5ebb13da9f2918ba52b7 to your computer and use it in GitHub Desktop.
ECR Lifecycle Policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": [ | |
{ | |
"action": { | |
"type": "expire" | |
}, | |
"selection": { | |
"countType": "imageCountMoreThan", | |
"countNumber": 3, | |
"tagStatus": "tagged", | |
"tagPrefixList": [ | |
"development" | |
] | |
}, | |
"description": "Keep at least the development image", | |
"rulePriority": 10 | |
}, | |
{ | |
"rulePriority": 20, | |
"description": "Remove images older than 90 days", | |
"selection": { | |
"tagStatus": "any", | |
"countType": "sinceImagePushed", | |
"countUnit": "days", | |
"countNumber": 30 | |
}, | |
"action": { | |
"type": "expire" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment