We use Amazon CloudFront to serve our static CSS and JS for dotspots.com. It's a fantastic and cheap pay-as-you-go CDN.
My only beefs:
1. Still no support for a root index.html (ie: serving the / URL from a domain) in either S3 or CloudFront, meaning you can't host a static site entirely on CloudFront.
2. No support in CloudFront for origin servers other than S3. Not a big deal, but CloudFront is so convenient that I'd like to stick it in front of more dynamic content as well.
My biggest beef is that you can't expire data on the edges. You have to rename the files. For some reason they decided to ignore the query parameters to a url when caching so for /img.png?123 they simply look up file /img.png in the cache. If they would just stop doing that it would be trivial to deliver newer versions to the edge servers by simply referring to it as /img.png?124 . If they could just add this it would work perfectly for most use cases I can come up with.
I wouldn't be surprised it's because it would allow a mostly static site using AJAX against AppEngine or a cheap PHP/MYSQL web hosting (aka no rate per hour rented VPS/EC2.)
It would, but Amazon's AWS policy has never shown any indication of being managed like that. They'd done a reasonable job of keeping prices low, making them cheaper as the underlying infrastructure is cheaper to run and adding options (spot pricing, etc) that can reduce how much you pay dramatically in some circumstances.
The big reason is that S3 uses REST and a / request on a bucket is equivalent to the 'listObjects' API call. They'd have to figure out a way to deal with legacy clients who use this REST method to list a bucket.
By default, files delivered through Amazon CloudFront are
publicly readable by anyone on the Internet. However, if you
require greater control over who can download or stream your
files, you can use Amazon CloudFront’s private content feature.
When this option is enabled, Amazon CloudFront will only deliver
files or stream media when you say it is okay to do so by
securely signing your requests. There is no additional charge
for using the private content feature.
I don't get it, signed requests? But private CDN sounds very good.
... except with an added step of making a CloudFront identity that is the only entity allowed to access the S3 object behind what you want to serve via CloudFront.
My only beefs:
1. Still no support for a root index.html (ie: serving the / URL from a domain) in either S3 or CloudFront, meaning you can't host a static site entirely on CloudFront.
2. No support in CloudFront for origin servers other than S3. Not a big deal, but CloudFront is so convenient that I'd like to stick it in front of more dynamic content as well.