AUTHOR: http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html LINK!

Recent AWS Customer Success Stories & Videos

More AWS Customer Success Stories...

« AWS Identity and Access Management Users Can Now Log in to the AWS Management Console | Main | Springboard (UK Tech Accelerator) Application Deadline Approaching »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c534853ef0147e27c3b9a970b

Listed below are links to weblogs that reference Host Your Static Website on Amazon S3:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

expert

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.

Joshua

The missing link is now just something like S3 which also runs PHP5.3 scripts. Imagine how awesome that would be. Deploy app code to "phpS3", deploy database to RDS and have a pure awesome web application stack. Pleeeeaaaase! :-)

Angus Li

This is awsome!!

Just wondering will S3 enable gzip/deflate for static content delivery in the future? This will reduce the bandwidth/cost as well as speeding up site loading.

Ed at Red Bridge

This is a great little a addition to AWS services. I don't see myself using it for any practical reason just yet, but I can already imagine a few pretty cool uses.

Peter Filias

I wonder if you can configure Wordpress to use S3?

Pothi

That is just awesome! I've been looking for this for a long time, but didn't expect it so soon. ;) Wonderful job guys!

@Peter: You can configure WordPress to use S3 to store the static data such as images, videos, attachments, etc. Just upload them on to your S3 bucket and link them to your WP powered blog/website. HTH. I hope you didn't mean to install WordPress on S3. ;-)

Joe Negron ~ NYC

@Peter - Wordpress needs something to process the php scripts and relies heavily on .htaccess rewrite rules - so you need at least a micro instance & apache for that but you can pull static images & videos, etc from S3 - we do it all the time... there are also ways to mount an S3 bucket so that apache can write to it directly (you can have apache read from it too but that defeats the purpose)- and provided it has the right security. See: http://LogicWizards.NET/mounting-an-s3-bucket-on-ubuntu-lucid/ for more info...

Mase

I can imagine writing rich client-side applications in something like SproutCore (http://www.sproutcore.com/) or Cappuccino (http://cappuccino.org/), and hosting them purely in S3. Amazing how a seemingly simple feature enables so much.

DD

This sounds like it will be great with static site generators like Jekyll https://github.com/mojombo/jekyll

Kylefox

I've been working on a tool for creating websites on S3 (https://github.com/kylefox/kirby) and these additions are the final pieces I needed :)

One small thing -- is there a way to get the endpoint URL for a bucket through the API? Unless I've overlooked something, it doesn't look like this is currently possible.

Eric P

Certainly great news. But there is a caveat...

It would seem that you still can't serve a site from root ("domain.com") in this fashion because a CNAME record cannot (or should not, because it breaks RFC) be applied to the root. You could certainly serve "www.domain.com" with s3 Website functionality, but "domain.com" would still need to point to a DNS "A" record.

So, if root domain is desired as the s3 Website address, it seems the only alternative would be to redirect all requests to "domain.com" to "www.domain.com". That means, still, a single point of failure for "domain.com", and a no go for sites that are established on search engines at the root level. Bummer.

I hope I'm wrong on this. Maybe there is an Amazon Route 53 solution, or something that I'm missing?

From RFC1034 section 3.6.2:
If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

http://www.faqs.org/rfcs/rfc1034.html

Eric P

Edward Dale

Cool idea. However, there's still no way to serve a site that doesn't use a CNAME, right? For example, example.com. Something would have to redirect example.com to www.example.com, which would be a CNAME to S3. I'd love for someone to correct me if I'm wrong.

Klickmich

Bummer! It has just been days that I put my blog http://inside.glnetworks.de behind CloudFront but could not use S3 as the origin without the now provided default directory object feature. Thanks for adding this feature! If I may: Configurable Redirects and/or Rewrites would be another great thing to have in either S3 or CloudFront.

Mennoabbink

This is a huge step and something we have been waiting for quite some time now. Two remaining questions:

Is this integrated with Cloudfront as well?
Can we expect SSL support (with own certificates like on the elastic loadbalancer) any time soon?

Ryan Townsend

Will this also work for CloudFront to deliver whole websites via a CDN? Would love to see ESI added to CloudFront, then we'd have the ability to take advantage of epic speed (CloudFront), reliability (S3/CloudFront multiple locations) and flexibility (CloudFront ESI -> EC2 hosting the dynamic content).

john adams

Finally! Awesome. I'm sure i'll use this for hosting microsites.

Niall

Sounds great. Thanks AWS!

Martin

Good news. I hope we get the A-NAME record thing soon, then this will be really useful.

Kyle

Has anyone had any luck with setting up this new Static WebHosting feature for their site? I've set up an index.html in the root of my bucket and it is styled with a CSS file located in the '/css' subdirectory but I am struggling to get the CSS file to style the index page. Any thoughts?

Amazon adding the static hosting feature is great, but until they implement more support for server-side scripting such as PHP, the service seems limited to simple HTML sites from the 90's! Thank you AWS, but you can do better! Until then, I'll eagerly await further advancements with this service.

Joel

I've been using Cloudfront and S3 to do this for a couple of months. Cloudfront felt like overkill to just set a default root object. Thanks AWS!

Brian

Seems to me this is presented as a bigger thing than it actually is. It allows your bucket to present a default page for the www address, and gives you a custom 404 page, and er.. that's it, isn't it? None of the approximately 120 sites I help maintain 100% static, so use seem very limited to me. It's a start, but on its own it's a long, long way from hosting a complete website in practical terms.

Luigi Montanez

I can't use this until I can serve my root domain without redirection to "www". Can Amazon designate an IP address (or set of IP addresses) for S3 that I can point my root A record to?

TVD

Amazon S3 combined with the Jekyll static site generator could be a formidable option for hosting static content. Think about all the potential static content we could use: Blogs, Microsites, Minimum Value Products (MVP).

Amazon S3 is thee standard for hosting webapp assets. This new feature to host static content is good added value. Now I'm really interested to see where the S3 platform is in 2-3 years. Congrats to Werner Vogels and the entire Amazon Web Services team.

Account Deleted

It is great to see that AWS is more agile and come out of this feature. Going forward, AWS should be doing a lot of such need based tweaks in EC2, EBS, CloudFront too.

Malcik.
http://www.cloudmanifest.com/

David Kocher

The latest snapshot build of Cyberduck allows website configuration for S3. Refer to http://trac.cyberduck.ch/wiki/help/en/howto/s3#WebsiteConfiguration

Shane

This seems pretty exciting and easy to use. So, I tried it out. Unfortunately, I ran into one small problem -- a problem that isn't Amazon's fault, but could be helped by Amazon.

My registrar has a fairly short limit on CNAME records. The typical website bucket endpoint is pretty long (e.g. s3-website-us-east-1.amazonaws.com). And you have to add to that _another_ entire subdomain and domain (e.g. s3.somehost.com.s3-website-us-east-1.amazonaws.com).

For regular bucket hosting, I can just point the CNAME to s3.amazonaws.com. So, I tried pointing to just the endpoint (s3-website-us-east-1.amazonaws.com). This fails for the website features, but still works for direct links to the content.

Are their shorter endpoint aliases? Or do I need to go complain to my registrar?

Thanks!

Jay Godse

This is awesome. It will gut the costs of web site hosting. I actually tried it too and it is relatively straightforward to use. You just have to make sure that the S3 bucket name is the same as the fully qualified subdomain which points to it.

I wrote up more at my blog post at blog.cloud-apps-experts.com/2011/02/cloud-services-amazon-s3-static-web.html.

Andrew Neely

Kyle, I had exactly the same problem until I applied a policy to my bucket giving anonymous users read access to all files inside. Using the policy generator in AWS can be a bear but it looks like BucketExplorer (Windows) and Cyberduck (Mac) let you set bucket permissions easily. Hope this helps.

Waddles

@Shane - The CNAME can be up to 255 characters long including the .s3-website-ap-southeast-1.amazonaws.com part (40 chars long), so effectively you should be able to create a bucket name of up to 215 characters to prepend to it.

Go complain to your DNS hosting company, not the registrar. See section 3.3 of http://www.ietf.org/rfc/rfc1035.txt for more info.

dbcn

Would it be possible to add an S3 served static page to an existing load balancer, or does the S3 bucket need it's own unique DNS record?

 Ezhil Arasan B

CloudBuddy Personal supports static website hosting via its S3 sites plug-in. Please refer this URL (http://cssinnovations.blogspot.com/2011/02/website-hosting-in-aws-s3-using-css.html) for more information.

rick

Any plans to support HTTPS? https://www.allthingsdistributed.com/

Tomáš Fülöpp

Hi,

I tried two DNS managers and found it is simply not possible to add a CNAME to example.com. Any subdomain is all right, e.g. www.example.com or images.example.com could be CNAMEd to the website bucket. But not the root domain name.

I therefore wonder whether it is a solution to use an A record instead of CNAME. E.g. using a ping I found the IP address of the bucket and now example.com properly shows the website bucket. So it works.

BUT what I need to know - and cannot find such information anywhere - whether the IP address of the website bucket will stay the same forever, or will it be changing, in which case my websites would stop resolving.

Thanks!

Jeff Barr

Hi Tomáš, this is what is called the "Zone Apex" problem. It is a shortcoming of DNS. We are working on a solution.

 Ezhil Arasan B

CSS Corp recently come up with a service called Arecord.net. Currently under BETA. This service allows you to host your static website in S3, and solves the problem of DNS A-record. All you need to do is, register your email id & domain name with Arecord.net and the ip address to configure your DNS A-record will be emailed to you. Once you configure your root domain to the given IP address, Arecord.net will start redirecting any request comes in for your root domain (.com) to www..com.

This service is applicable for S3, CloudFront & ELB as well.

Check this out and provide your valuable feedback to us. Hope you will enjoy using our service Arecord.net

Website : http://arecord.net

J.P.

Hi there, this service is awesome, I have been using s3 since the early days when I had to do all the coding myself to get things back and forth.

I think I found a bug however. When using a custom domain with a CNAME redirection to a matching bucket name AND the target file name has a space in the name of the file, the response seems to always be 403. I have verified permissions are public.

For the same file accessed in either the website method or bucket name method, spaces are allowed.

Replacing the space with a _ worked perfectly and I can access the same file without changing any permissions. Thanks. I didnt really require spaces, but thought I should let you know.

p.s. this comment box seems to not allow single quotes or parentheses... but does not tell you that. Just gives an error.

The comments to this entry are closed.

Featured Events

The AWS Report


Brought to You By

Jeff Barr (@jeffbarr):



Jinesh Varia (@jinman):


Email Subscription

Enter your email address:

Delivered by FeedBurner

April 2014

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30