Last active
May 30, 2023 07:00
-
-
Save shcallaway/f5449bfcc35f6f3f4df7944f8da13920 to your computer and use it in GitHub Desktop.
Apply the same lifecycle policy to all AWS ECR repositories
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
#!/bin/bash | |
aws ecr describe-repositories | jq '.repositories[].repositoryName' | xargs -I {} aws ecr put-lifecycle-policy --repository-name {} --lifecycle-policy-text "file://policy.json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment