Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone have thoughts on deploying static sites to S3?

I have a few static sites and single-page JS apps, and right now I just serve them with Nginx off a shared server. I've tried looking for a definitive answer on "Where should I host static sites?" but it hasn't appeared yet.



Easiest option would be to use GitHub pages - http://pages.github.com/

But if you prefer to have more control and availability, you can use S3. Punch makes publishing process to S3 really easy - https://github.com/laktek/punch/wiki/Publishing-a-Site


I've been playing around with something around this lately, and have found that S3 works pretty well as-is - throw your stuff into a bucket, configure it for a website, and you're pretty much done. The performance is acceptable (IMO) and it's cheap (12c/gb transferred, about the same per gb stored/month). You don't really get too much control though (though you can set bucket policies that IIRC can filter on IP, referrer, host headers).

At the moment, I've gotten to the point where I have Varnish running on an EC2 micro instance serving data from S3 (I have a couple of reqs that prevent S3 from supporting my usecase out of the box [mostly to do with having too many buckets, not being able to use bucket folders]). There are issues I need to resolve with invalidation as well as the latency of the first request with this approach, but it does look promising.


I have an Octopress site that I generate locally and sync up to S3, this blog outlines how to get it setup. Once you've created the Rake task it's as simple as "rake deploy" and everything is uploaded to S3.

http://blog.jacobelder.com/2012/03/deploying-octopress-to-am...


I was just experimenting with it now, actually. If you're willing to accept that you have to use a subdomain it should work fine. Just set up your S3 bucket to host a website, set the index and error documents properly, and set www.yoursite.tld to a CNAME pointing at the website domain S3 generates for you.


S3 is fine, except that dealing with anti-hotlinking through bucket policies has been unsuccessful at least for me now. But if that's not a concern, I say go for it.

You'll have to write or pay for a tool to push your posts to Twitter, though. It can also be a bit of a bummer to not have an ID to map to shorturls and such.


It works, is cheap and pretty simple. Using cloudfront (the CDN) in front of S3 gives you much better performance.

http://aaronblohowiak.com/blog_posts/using-amazon-s3-and-clo...


I experimented with S3 but found Rackspace CloudFiles better for my needs. S3 does not serve content compressed, where CloudFiles does. CloudFiles is automatically served through an Akamai CDN, while S3 can be served through CloudFront but needs configuration to do so.


https://www.nearlyfreespeech.net or even github pages ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: