8 ms·
Host Your Static Website on Amazon S3
- juddlyon 16y agoThat sound you hear is the collective groan from every oversold cheapo shared hosting company owner. Unlimited hosting for 5 bucks? How's world class with a CDN for 45 cents?
- pjscott 16y agoPlus, Amazon doesn't say "unlimited" and then turn around and say "haha oops there are pretty low limits after all!" when you get Slashdotted. Their pricing is transparent. The cheapo shared static hosting providers are now officially the living dead.
- spitfire 16y agoUnless they rebuild their cheap static hosting company on top of s3 with some value add. Worked for heroku very nicely.
- ez77 16y agoSorry if I sound naive about the term 'unlimited' here, but what are the implications of your comments [1]? I see that S3 does not offer a flat-fee, 'unlimited' model at all [2]. In fact, if my math is right 5 bucks only gives you $5/($0.1/GB) = 50GB of data transfer (forgetting about the other costs). Edit: I didn't see the 'data in' vs. 'data out'. I think it's actually worse: the first 1GB out free, and 33.33GB extra at $0.150/GB. So 5 bucks doesn't quite give you 35GB! [1] My guess is that with this 'unlimited' you'll never get even close to 50GB of monthly data transfer. [2] http://aws.amazon.com/s3/#pricing http://aws.amazon.com/s3/#pricing
- bigiain 16y agoYou've been able to do this for a while now with CloudFront serving your S3 buckets - I'd suggest the few extra cents per month for the CloudFront CDN service is probably a better way of managing static Amazon hosted sites... (curiously, the domain name I experimented with this on late last year is strangely appropriate here: http://www.damhik.com/ http://www.damhik.com/ )
- sharth 16y agoThat's not entirely true. With cloudfront, you were able to set that when you goto http://example.com http://example.com that it would send you to http://example.com/index.html http://example.com/index.html. However, it would not support you when you accessed http://example.com/dir/ http://example.com/dir/. That would not redirect to http://example.com/dir/index.html http://example.com/dir/index.html.
- petercooper 16y agoCouple this with tools like Jekyll or nanoc (with JavaScript-powered comments, perhaps) and you can easily roll out powerful static sites that are dynamic locally. I can see this getting a lot of use because it makes it so easy to rig up new sites right from the shell. It was already pretty easy but the ability to create a new "site" by merely creating a bucket on S3 reduces the friction even more. (Perhaps too easy, even.. Rig up a domain registration API, content generator, and an S3 uploader and you could have a script pumping out auto-generated "content" sites all day without any hassles right from your terminal window.)
- petervandijck 16y agoPumping out content sites is easy enough. Terminal window would actually be a barrier to entry there :)
- joshkaufman 16y agoI'm in the process of converting from Wordpress to Jekyll right now. This announcement made me VERY happy.
- PStamatiou 16y agonice, let me know if you need any help. i did the same thing a month or two ago and wrote a guide about it.
- deleted 16y ago[deleted]
- reneherse 16y agowould love to see the guide, if you're inclined to share it widely...
- PStamatiou 16y agoyeah sure: http://paulstamatiou.com/how-to-wordpress-to-jekyll http://paulstamatiou.com/how-to-wordpress-to-jekyll it was on HN not too long ago
- expertio 16y agoExactly! Sometimes I just want to create some static pages, but I was forced to use either CMS or things like wordpress. Now I guess there is a solution which is also super reliable. AWS is just amazing.
- requinot59 16y ago> Sometimes I just want to create some static pages, but I was forced to use either CMS or things like wordpress. Wtf?! To create static pages, I open Emacs and type there. No need of a CMS or Wordpress to create an HTML page! Then to host it: scp page.html me@srv.com:~/public_html/ and you're good to go. Hosting a website on S3 is nice, but it's not simpler than what is already possible if you own a server. If you don't already own one, I'm not sure setting up an AWS account + client code is easier than creating a new VPS account. I surely would prefer to set up a Linux VPS, which is an environment I'm confortable with. Regarding the costs, I rent one private (not virtual) server for 20 euros/month, and host several (static and dynamic) sites on it, so it's actually cheaper than going the AWS road. Uptime last time I logged: 560 days (aka reliable enough for me).
- alextgordon 16y agoYou misunderestimate the ineptitude of unwitting sysadmins such as myself. It takes me days to set up a VPS. It took me a good few weeks to figure out how to get Django working. I screwed up my latest VPS so badly that I had to scrap the thing and start again. Some people really suck at these things. > Regarding the costs, I rent one private (not virtual) server for 20 euros/month, and host several (static and dynamic) sites on it, so it's actually cheaper than going the AWS road. Uptime last time I logged: 560 days (aka reliable enough for me). S3 will cost literally pennies for hosting a simple static website. A VPS is orders of magnitude more expensive.
- long 16y agoThe cost of S3 is around 0.1 euro per gigabyte. For the amount that you are currently paying per month, you could serve 200 gigabytes through S3. Of course, that doesn't include storage costs, but those should be negligible for static sites.
- petervandijck 16y agoMay I say "awesome" and "finally"? That's awesome. Finally.
- moe 16y agoI'd like to reinforce the "finally". This has been requested on the AWS forums for years. However, the fact that AWS crushes entire business models with every move they make relativizes their slow pace somewhat.
- petervandijck 16y agoAnd I wouldn't say they're slow, on the contrary. They've been adding features to AWS like clockwork for like 6 years now. Every few months, they add something that a large amount of people love. And then it just works. That's awesome. They're running a marathon, not a sprint, and doing awesomely well so far.
- pjscott 16y agoSpeaking of finally, I wonder when they're going to add proper support for "Content-Encoding: gzip". Last I checked, people would upload gzipped content and add the Content-Encoding header on top, which is inconvenient and doesn't support browsers that can't handle gzipped responses.
- nborgo 16y agoHonest question: which browsers can't handle gzip'd responses?
- pyre 16y agoI've had issues with gzip and wget, though I don't know if that was just a mis-configured site or something (and wget isn't a browser).
- intranation 16y agoIE6 has problems with cached Gzip files: basically it forgets they're Gzipped in the cache and then drops the Content-Encoding part of the file. So it loads garbage as far as the JS interpreter is concerned.
- wickedchicken 16y agoThis is nuts. It's nice to see the internet being increasingly commoditized -- hell, Amazon has commoditized people.
- lazyjeff 16y agoDo they also give you the server logs? e.g. access.log
- boctor 16y agoYes, s3 buckets let you specify a bucket for logging and they include things you'd expect like IP address, referrer: http://docs.amazonwebservices.com/AmazonS3/latest/dev/ServerLogs.html http://docs.amazonwebservices.com/AmazonS3/latest/dev/Server...
- newobj 16y agos3 has provided access logs for a long time. http://docs.amazonwebservices.com/AmazonS3/latest/dev/ServerLogs.html http://docs.amazonwebservices.com/AmazonS3/latest/dev/Server...
- michaelbuckbee 16y agoI think is this bigger news than it seems as this enables many other new services to now be built on top of S3.
- petervandijck 16y agoYep. Just wait until Dave Winer gets going with this :)
- cstuder 16y agoHe already is on it: http://scripting.com/stories/2011/02/17/howToMapADomainToAnS3Bucke.html http://scripting.com/stories/2011/02/17/howToMapADomainToAnS...
- deleted 16y ago[deleted]
- todd3834 16y agoSo now you could build a pretty serious web application with frameworks like Backbone.js and host it for pennies, very cool.
- nivertech 16y agoHow's www.mydomain.com vs. mydomain.com handled? Do I need to create two S3 buckets with duplicated content?
- todd3834 16y agoIts pretty easy to redirect mydomain.com to www.mydomain.com (or the other way around) through your domain registrar these days.
- treitnauer 16y ago...or you have your domain registrar doing the redirection for you automatically when setting up the DNS for S3: http://iwantmyname.com/services/developer/setup-custom-domain-amazon-s3 http://iwantmyname.com/services/developer/setup-custom-domai...
- bobf 16y agoSo, who is going to be the first person to create a new static hosting provider built on top of S3?
- anemitz 16y agos3 is the new geocities:P
- davidcann 16y agoThis is perfect for auto-scaled hosting a Cappuccino app, so the server cluster can be focused only on the backend.
- scalyweb 16y agoAs entrepreneurs at what point do you decide that Amazon is "too big" and do you decide to stick with smaller service providers? Is your use of Amazon strictly a commodity provider?
- jpadvo 16y agoWhat do you mean by "too big"? I guess what I'm wondering is what about that would motivate switching to smaller providers.
- scalyweb 16y agoThis probably deserves a separate discussion. As an entrepreneur do you also use other entrepreneur's/start-up's services or just rely on the big (market share) players in the market? A startup is hard so do you go out of your way to help support other smaller service providers? If you have an opportunity to support competition in the marketplace by not flocking to the lowest price(Walmart) but paying a bit more for a smaller service, do you make that sacrifice? Knowing that NearlyFreeSpeech.Net appears to offer similar functionality, why choose a larger provider like Amazon if you have the mindset of a founder?
- tptacek 16y agoNo part of the mindset of a founder requires you to select inferior alternatives out of empathy for the people who provide them.
- ericd 16y agoNah, the only reason to go with a startup is if it's better than the big guys, or you need personalized service, or you think they'll move much faster than the big guys, and it would block you otherwise. If they're not much, much better than the incumbents they're competing with, they're going to go out of business, leaving you with a broken dependency.
- wladimir 16y agoBetter customer service. Small companies usually make it possible to get to speak to a real (and knowledgeable) person quickly in case of a problem. They really value their customers because they have a problem when they leave. Try doing that with juggernauts such as Google or Amazon.
- laktek 16y agoIt would be great if someone could build a routing service (ala .htaccess on the cloud), so that we can make use of S3 without breaking the URLs.
- nika 16y agoI gotta give Amazon props for extending their products along the lines that their customers clearly want. The only problem is, given the wikileaks affair, I don't trust them. Maybe this is silly. It is certainly not like they're likely to pull down any of my stuff. And I do have some largish files hosted there for convenience, but I'm wary about becoming dependent on them in any way. (Wikileaks was hosting their webpage on amazon, not the leaked cables themselves. Amazon pulled their account without having gotten a court order or giving them any warning, and they weren't hosting anything illegal there anyway.)
- jayzee 16y agoI am not an Amazon supporter but come on, do you think if you were hosted on any other US service, rackspace or what have you, that they would keep hosting you while the us govt was pressuring them to shut you down?
- SamReidHughes 16y agoFor static websites? I'd expect http://nearlyfreespeech.net/ http://nearlyfreespeech.net/ not to do so.
- nika 16y agoThats the thing about integrity. You never know if someone has it until it is tested. This same question could be asked about any hosting company that hasn't been presented with such a request. I'd be interested in hearing about hosting companies that have, and that stood up to them. The US is supposed to be a country of rule of law. They should need to get a court order.
- dustingetz 16y agohosting companies probably don't see value in standing up to the govt -- lawyers are expensive! how much would you pay for this feature?
- danshapiro 16y agoDreamhost has a reputation for being pro-free-speech, and there are some anecdotes online that support this. Their TOS are also on the more friendly side, from what I've seen. I've also been quite pleased with their hosting in every other respect. (disclaimer: founder is an old college friend)
- corin_ 16y agoThis is awesome, but there is one thing I wish could be changed. I currently host my (Jekyll-powered) site with S3/CloudFront. The error pages is awesome, but it only works if accessed through S3, not CloudFront.
- JoachimSchipper 16y agoThe article talks about custom 4xx error pages - what more do you need?
- corin_ 16y agoIf your site is accessed through CloudFront, those custom error pages don't come into effect... as I clearly said.
- nfriedly 16y agohttp://sociablelabs.com http://sociablelabs.com has been doing this for a little while now and I've been pretty happy with the performance,
- delackner 16y agoMaybe this is a good place to ask about an idea I've been toying with, but I'm not sure about the security implications of. I have an app that generates user content, little chunks of audio. I don't want to get into running some server infrastructure just to let users share their content on facebook/twitter/... so what about letting the app upload an html file to an s3 bucket, with the data embedded in the file and a bit of javascript for an audio player UI? Practical?
- StavrosK 16y agoIf the html file is self-contained, sure. Basically, if you can serve it from a static directory and have it work, it'll work on S3.
- amysue 16y agoit's almost a CouchApp :) http://couchapp.org/page/what-is-couchapp http://couchapp.org/page/what-is-couchapp
- mleonhard 16y agoIt's still impossible to host the root domain of your website on S3/CloudFront or serve it through an EC2 Elastic Load Balancer. www.mycompany.com - OK mycompany.com - needs an EC2 instance and Elastic IP This is because the only way to point your domain at Amazon is with a CNAME record and DNS does not support default CNAME records. It can only work if you add your CNAME record to the 'com.' top-level domain, which is impossible. See https://forums.aws.amazon.com/thread.jspa?threadID=32044 https://forums.aws.amazon.com/thread.jspa?threadID=32044
- speleding 16y agoThat is easily solved by doing a permanent redirect (301) from mycompany.com to www.mycompany.com. Many DNS providers such as Godaddy.com have a free redirect service just for that purpose.
- StavrosK 16y agoDo they? I have to look for that, I've been sending all those to a server of mine for that purpose, but if that server goes down or shuts down or anything, my redirects will stop working. Thanks for the info!
- fierarul 16y agoSee http://www.wwwizer.com/ http://www.wwwizer.com/ , hosted on EC2 btw last I checked.
- StavrosK 16y agoFantastic, thank you. I thought of making something like that, but now I don't have to!
- mleonhard 16y agoI'm thinking of making a paid version of this, with multiple IPs in each region. I registered rootredir.com. Are any of you interested in this? How much would it be worth to you per month?
- StavrosK 16y agoOr use App Engine and get pretty URLs, stats, etc as well: https://github.com/stochastic-technologies/static-appengine-hoster https://github.com/stochastic-technologies/static-appengine-...
- jonstjohn 16y agoAre cheap static sites really that big of a break-through? Whether a site is 50 cents a month through Amazon or $20/month for dozens through Linode (with the option of non-static), doesn't seem to matter that much to me when most people spend well over $20/week for coffee. The lowest-paid programmer in the US can make $20 in an hour. Anyways, love all the services that Amazon puts out and this is definitely a nice option, but I don't see it as exciting news on an individual basis. Anybody agree?
- cvk 16y agoThis could be useful if your site has an extended outage one day. Create a bucket called "mysite.com" and another called "www.mysite.com" and put your failwhale page in it (set to be the root page). If your site goes down and you know it will be down for an extended period (ouch), you can change your domain's DNS entries to point to s3.amazonaws.com. Then at least your customers will have an explanation.
- sudonim 16y agoI ported my site to jekyll last night and moved to S3 for hosting. Then I realized that my .htaccess file wouldn't work so I couldn't redirect some links I wanted to keep. I'm mostly a product guy, and the entire experience of setting up jekyll was exhilarating. S3 was pretty easy to set up for hosting. http://iamnotaprogrammer.com.s3-website-us-east-1.amazonaws.com/ http://iamnotaprogrammer.com.s3-website-us-east-1.amazonaws.... But, I moved the site back to linode for htaccess to work. http://iamnotaprogrammer.com http://iamnotaprogrammer.com