S3 Static Website Hosting

Overview

Amazon Simple Storage Service (S3) is a great platform for hosting static websites without the need of a web server and it can be made accessible in minutes. Hosting a static website provides number of benefits including its cost-effectiveness where you only pay for the storage and bandwidth you use. S3 is highly scalable and can handle large amounts of traffic. It provides multiple security features like data encryption and access control to make your data safe and secure. It is highly reliable with robust infrastructure and is designed to provide high availability and durability.

Architecture

Steps to create and host a static website with S3

  1. Create an S3 bucket with the same name as your domain name “movetocloud.xyz" (Domain names can be purchased at very low cost through websites like GoDaddy, NameCheap, etc

  1. Upload an index.html file to the S3 bucket

  1. Under the bucket properties tab, enable static website hosting and select index.html file

  1. Now in the permissions tab, add a bucket policy that allows public read access to the objects stored in the S3 bucket

  1. Test the website by using the S3 object URL and it should take you to the web page

  1. Now, in order to redirect the domain name "movetocloud.xyz" to the S3 bucket, create a record under the domain name in the Route 53 hosted zone, so that the bucket will be connected to the domain name. Using the simple routing policy, create a record and choose the endpoint as S3 website endpoint

  1. Finally, the changes should reflect, and using the domain name “movetocloud.xyz” (different in your case), you should be able to view your website hosted on S3