If you look at my posts here, you can tell that I have a bit of a love affair with Amazon Web Services. I won’t deny it either, because I do. But, just because I love AWS doesn’t mean that it’s perfect. Like any relationship, it’s far from it.
Recently I moved from Amazon S3 to CloudFront with a custom origin. CloudFront’s custom origin option essentially makes CF a pull CDN. After looking at the the front page I noticed that the CSS wasn’t loading – at all! In fact, it wasn’t even there!
Upon further research, I realized CF doesn’t handle GZipped content when using custom origins.
Obviously, that’s an issue since gzip is one of the ways I make this whole thing run fast.
In order to serve GZipped content via CF, you have to use both S3 and CF together. Your S3 bucket becomes your CF distribution origin.
Though it’s round about, it works very well.
Hope that’s helpful!







I am also happy user of Amazon AWS and cloud front services,I am using Bucket Explorer to implement these services….Its really amazing…
Awesome! Glad to hear it! I’m not a big Bucket Explorer fan though…honestly I prefer CloudBerry or the AWS console.
This fellow here says the exact opposite: no gzip with S3 origin, and gzip support only with custom origin: http://www.nomitor.com/blog/2010/11/10/gzip-support-for-amazon-web-services-cloudfront/
what’s up with that?
That’s interesting. I havent tried a custom origin in a while, so they mightve added support for gzip, but otherwise he’s incorrect. My CF distribution for this site uses S3; Take a look at this page’s source and you’ll see .gzip all over the place.