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: ec2-terminate-non-standard-region | |
resource: ec2 | |
description: | | |
Any EC2 instance launched in a non standard region outside | |
of us-east-1 and eu-west-1 will be terminated | |
mode: | |
type: cloudtrail | |
events: |
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: ec2-mark-stopped-instance-realtime | |
tags: [Realtime,Tag] | |
resource: ec2 | |
mode: | |
type: cloudtrail | |
events: | |
- source: ec2.amazonaws.com | |
event: StopInstances |
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 | |
ASGName='YOUR_CUSTODIAN_AUTOSCALING_GROUP_NAME' | |
RESOURCE_BUCKET='S3_BUCKET_CONTAINING_YOUR_POLICIES_AND_CONFIG' | |
## Sets up proxy for instance run | |
export no_proxy="169.254.169.254" | |
export http_proxy='http://PROXYADDRESSHERE.com:9090' | |
export https_proxy="$http_proxy" |
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-deny-public-object-acl-poll | |
resource: s3 | |
description: | | |
Appends a bucket policy statement to all existing buckets to deny anyone from setting s3 objects | |
in the bucket to public-read, public-read-write, or any authenticated AWS user. | |
actions: | |
- type: set-statements | |
statements: |
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
{ | |
"account":"accountaliashere", | |
"account_id":"1234567890", | |
"region":"us-west-1", | |
"action":{ | |
"violation_desc":"Public IP Address:", | |
"to":[ | |
"[email protected]", | |
"event-owner" | |
], |
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
<!DOCTYPE html> | |
<html lang="en"> | |
{# | |
Template customizations: | |
- additional parameters for slack channel and email for questions | |
- link to our internal docs | |
- case-insensitive tag lookups in the getTag macro | |
- formatting that renders correctly in Office365 and acceptably in GMail |
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: high-risk-security-groups-remediate3 | |
resource: security-group | |
description: | | |
Remove any rule from a security group that allows test ingress | |
and notify the user who added the violating rule. | |
mode: | |
type: cloudtrail | |
events: | |
- source: ec2.amazonaws.com |
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
- name: delete-old-snapshots-under-20-gb | |
resource: ebs-snapshot | |
description: | | |
Deletes a snapshot if its older than 7 days and it was created by cloud custodian | |
filters: | |
- type: value | |
key: VolumeSize | |
op: lt | |
value: 20 |
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: sagemaker-notebook-auto-tag-user | |
resource: sagemaker-notebook | |
description: | | |
When a new Sagemaker notebook is created tag the creators ID to CreatorName tag | |
mode: | |
type: cloudtrail | |
events: |
OlderNewer