Click here to show or hide the menubar.
Thread started by Dave Winer on Friday, December 28, 2012.

Amazon and static sites

According to a post late last night by Werner Vogels, CTO at Amazon, and an email they sent to all AWS users just now, and a walkthrough on the AWS site, they appear to have finished the implementation of static websites on S3. I'm going to check that out right now and report back.

The problem was in the past you could only map a CNAME to a bucket, not the domain itself. This is because of a limit in the DNS system. They appear to have implemented a non-standard (and appreciated!) alias feature in their Route 53 DNS service, which many of us use.

What's not clear in the docs is if a request from mydomain.com is

1. Redirected to www.mydomain.com or

2. If the user of your site simply sees the content as residing at mydomain.com.

To some this may seem picky, but I won't be using the feature if it's #1, because I think it's just plain wrong to waste four characters at the beginning of a web URL. I'm a member of the No-WWW movement. I would rather pay the extra money for a host than have readers of scripting.com be redirected to www.scripting.com. However if the distinction is tranparent to users, then I'll use it, but hope that next year they get rid of this limit.

Cliff Notes version of the walkthrough

Their walkthrough is very verbose. I'm going to do the Cliff Notes version here.

1. Register a domain and set it up so it's managed by Route 53. For my demo, the domain is bloatware.org. It's a real domain, with a placeholder home page currently being served by other software. If this goes well it will be hosted in an S3 bucket.

2. Create an S3 bucket for the domain. Screen shot.

3. Upload the website. In this case, I just have an index.html file with an image on it. Screen shot.

4. You have to add a "bucket policy." Follow the instructions in step 4 of this howto I did a couple of years ago.

5. Next, configure your bucket for website hosting. Click on its name in the left panel, and then click on Properties at the top of the right panel, and then Static Website Hosting below that in the right panel. You should get a display that looks like this screen shot. Important, copy the endpoint because you'll probably need it in the next step. (We hope.)

bloatware.org.s3-website-us-east-1.amazonaws.com

6. Finally, go to Route 53, and set it up so it's hosting your domain. For that you can refer to the Amazon docs. But the key new feature is the ability to make the root name a CNAME that's an alias. I just guessed how to do it (the docs are too complex to follow) and it worked! Hey they did it right. Yehi. ;-)

Postscript

They did it the right way, #2 above. I can host scripting.com in a bucket and the user will not see www.scripting.com. You can redirect from www.scripting.com to scripting.com any way you wish, you don't have to use Amazon's method. That's why the docs are so confusing, they assume you need to use their software to do the redirect.

One more thing

Now that they have this wonderful feature, it would be nice if they increased the per-user limit on buckets from 100 to something more reasonable, perhaps 10000. :-)

Or maybe no limit at all. It would be great to set up a hosting service based on this feature, and the arcane process of setting it up. It could be very useful, for example, to Dropbox users. But with a limit on the number of buckets, and buckets being the basic unit of this feature, it's impossible to set such a service up.

Gives Werner something to ask for next year? :-)

XML