News for hackers. Stuff that matters.
Re:How To: Hosting with Amazon S3, CloudFront and Route 53 by mattdeboard on Monday January 13, 2014 @08:16PM (#7054759)
One big warning here.

If you are wanting to serve static content for multiple domains (e.g. somefont.ttf for foo.example.com, bar.example.com and baz.example.com from a single CloudFront distribution) CloudFront is not your solution, because CloudFront does not vary its cache on the Origin header. So if your first visitor is loading foo.example.com/static/fonts/somefont.ttf, then the Access-Control-Allow-Origin header for somefont.ttf will be set to "foo.example.com". Subsequent requests for that file from (bar|baz).example.com will fail with a CORS error.

It was a pretty shocking thing to find out. We've concluded AWS/CloudFront isn't a viable CDN until this is fixed. Based on the following thread, it isn't clear when or if it will be fixed: https://forums.aws.amazon.com/thread.jspa?threadID=114646#

Re:How To: Hosting with Amazon S3, CloudFront and Route 53 by prostoalex on Tuesday January 14, 2014 @12:03AM (#7055489)
Any reason to serve this from a single distribution? Their UI basically tells you in no uncertain terms that subdomain == distribution.
Re:How To: Hosting with Amazon S3, CloudFront and Route 53 by mattdeboard on Tuesday January 14, 2014 @10:50AM (#7057607)
Where does it say that? I'm not talking about assigning foo.example.com as the domain name for the distribution.
Re:How To: Hosting with Amazon S3, CloudFront and Route 53 by prostoalex on Tuesday January 14, 2014 @06:18PM (#7060488)
Right, this is still the scenario where you're using the distribution hostname they give you, e.g. abcdef1234.cloudfront.net

http://docs.aws.amazon.com/AmazonCloudFront/latest/Developer...

"Changing the origin does not require CloudFront to repopulate edge caches with objects from the new origin. As long as the viewer requests in your application have not changed, CloudFront will continue to serve objects that are already in an edge cache until the TTL on each object expires or until seldom-requested objects are evicted."