Last active
August 15, 2016 01:43
-
-
Save paulwakeford/a3ad1f390b1f270c6570 to your computer and use it in GitHub Desktop.
Enable CloudTrail for all regions
This file contains hidden or 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
for i in `aws ec2 describe-regions --region ap-southeast-2 --query 'Regions[*].RegionName' --output text`; do aws cloudtrail --region $i create-trail --name Default --s3-bucket-name BUCKETNAME-HERE `[[ "$i" = "ap-southeast-2" ]] && echo "--include-global-service-events" || echo "--no-include-global-service-events"`; aws cloudtrail --region $i start-logging --name Default; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment