Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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   
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.