- AWS account
- AWS Access Key ID and Secret Key
- python2
- virtualenv and pip
- IAM role for AWS Lambda with "AdministratorAccess" policy attached
git clone git@github.com:obounaim/cloud-custodian-hands-on.git
cd cloud-custodian-hands-onvirtualenv -p /usr/bin/python2 c7n_venv
source c7n_venv/bin/activate
pip install c7ncustodian --help
custodian run --helpExample with ec2 resource :
custodian schema aws.ec2
custodian schema aws.ec2.actions
custodian schema aws.ec2.filters custodian run policy.yml --output-dir logs/
custodian run policy.yml --output-dir logs/ --profile aws_dev_accountcustodian run policy.yml --output-dir logs/ --cache-period 0Policy examples in "examples" folder :
cd examples
mkdir logsbasic_mode.ymlcloudtrail_mode.ymlperiodic_mode.yml