Skip to content

Instantly share code, notes, and snippets.

@adampats
Created January 19, 2016 20:35
Show Gist options
  • Save adampats/26b829fe38204b6971e7 to your computer and use it in GitHub Desktop.
Save adampats/26b829fe38204b6971e7 to your computer and use it in GitHub Desktop.
View CloudTrail logs from S3 quickly
bucket_name="my-cloudtrail-bucket"
acc_num="myacc"
region="us-west-1"
aws s3 cp --recursive s3://$bucket_name/AWSLogs/$acc_num/CloudTrail/$region/2016/01/
ls
gunzip -c cloudTrail-log-file-name.json.gz | jq .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment