3

My sites traffic is finally starting to peak, and I am a heavy user of AWS CloudFront. I'd like to optimize our bandwidth, but I don't see anyway of getting a detailed breakdown of which files are contributing most to the bandwidth costs.

1 Answer 1

3

You can enable logging in Cloudfront, which will generate a log file containing a list of requests (and placed into an S3 bucket). You can then parse those log files as you would with server logs to determine the files, IPs, or even edge servers using the most bandwidth.

There are also a few programs that will provide information about the logs - I believe Cloudberry and Bucket Explorer are some of them.

The files are gzipped and added to your bucket approximately hourly.

The format of the file resembles the following:

date time x-edge-location sc-bytes c-ip cs-method cs(Host) cs-uri-stem sc-status cs(Referer) cs(User-Agent) cs-uri-query
2011-06-27  08:31:10    JFK1    587 xxx.xxx.xxx.xxx GET xxxxxxxxxxxxxx.cloudfront.net   /path/to/your/file  304 http://www.mydomain.com/page/requesting/file    User-agent-string   

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .