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.
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: