Created
February 25, 2022 21:51
-
-
Save OtherDevOpsGene/99b604fafb7e5a4c14d3e9b48b74d872 to your computer and use it in GitHub Desktop.
Cloud Custodian read-only report policy that finds used images older than 60 days and unused images older than 14 days.
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
policies: | |
- name: old-images-report | |
resource: ami | |
comment: | | |
Report on all used images older than 60 days. | |
filters: | |
- type: unused | |
value: false | |
- type: image-age | |
days: 60 | |
- name: ami-unused | |
resource: ami | |
comment: | | |
Report on all unused images older than 14 days. | |
filters: | |
- type: unused | |
value: true | |
- type: image-age | |
days: 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment