Host a static website on AWS

Dilip Kola
Tensult Blogs
Published in
2 min readDec 16, 2017

This Blog has moved from Medium to blogs.tensult.com. All the latest content will be available there. Subscribe to our newsletter to stay updated.

This is Part-1 of a multi-part blog post of how you can run a fast dynamic website in a completely serverless manner using managed services provided by AWS

In upcoming posts, we will explain

Amazon S3 (Simple storage service) which is a widely popular object storage service and it also supports static web hosting using which we can host the static websites without provisioning any servers. The websites hosted on S3 scales automatically so no need to worry about the website traffic being increasing or decreasing. S3 static web hosting feature also can be used for site redirection in case of rebranding of the site.

To host a static website, we just need to put all our website HTML, CSS, JS and media files in an S3 bucket and then follow the steps below to get the website up and running in a few minutes with very low cost.

The S3 Bucket name should be same as your website name. Example if your website is www.mywebsite.com then you will need to create bucket with name www.mywebsite.com. When you create the bucket make sure you select the region which is closest to your customers. Also a point to be noted here is S3 bucket names are globally unique. If someone already has a bucket with name MyBucket then you can’t create a bucket with the name MyBucket in any region.

Now we need to make all the files in this S3 bucket publicly readable. To do so you can set following permissions to the S3 bucket.

Now you are just a few steps away from making your website live. For this part logon to AWS Management Console and then go to S3 and select your website bucket and then go to bucket properties and enable Static Website Hosting.

We have just setup a static website now and we will share a lot more details in upcoming posts, so stay tuned.

For further details visit: http://docs.aws.amazon.com/gettingstarted/latest/swh/website-hosting-intro.html

--

--

Dilip Kola
Tensult Blogs

Spirtual Seeker | Mentor | Learner | Ex-Amazon | Ex-AWS | IIT Kanpur