Skip to content

Instantly share code, notes, and snippets.

@chluehr
Created May 7, 2018 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chluehr/116dd0830a3b7268ef2fc3230e39072c to your computer and use it in GitHub Desktop.
Save chluehr/116dd0830a3b7268ef2fc3230e39072c to your computer and use it in GitHub Desktop.
Makefile to fetch(sync) Cloudfront S3 Logs and analyze them with goaccess Logfile Analyzer.
all: fetch report
fetch:
aws s3 sync --exclude "*" --include "*2018-03-*" --include "*2018-04-*" --include "*2018-05-*" s3://$BUCKET/$PATH/ .
report:
find . -name \*.gz | xargs gzcat | goaccess --log-format CLOUDFRONT --date-format CLOUDFRONT --time-format CLOUDFRONT -o ./report.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment