-
-
Save makash/0d969155e2f4de04bae5267f2f1c8a3c to your computer and use it in GitHub Desktop.
A Cloud Custodian policy file that finds S3 buckets which are public and makes them private if they match certain tag filters
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: s3-remove-public-access | |
description: | | |
Finds global access s3 buckets in your account and fix them | |
resource: s3 | |
region: us-east-1 | |
filters: | |
- type: global-grants | |
- type: value | |
key: "tag:createdby" | |
value: "automation" | |
- not: | |
- type: value | |
key: "tag:type" | |
value: "static-site" | |
actions: | |
- type: delete-global-grants | |
grantees: | |
- "http://acs.amazonaws.com/groups/global/AllUsers" | |
- "http://acs.amazonaws.com/groups/global/AuthenticatedUsers" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment