*Please download the resources file before you proceed with the steps.
Have you ever wanted to host a static website for your company but didn’t want to pay outrageous prices? Amazon S3 can help! Hosting with Amazon S3 is free, and the only cost you will incur is if you store data over 10TB. This blog post will teach you how to host a static website using Amazon S3bucket. There are many cloud providers, but here we are using AWS because:
- The number one reason to use AWS is that they offer a “Free Tier” which means you don’t have to worry about paying for your usage.
- The second big benefit of using AWS service is scalability and elasticity. These two things allow AWS to be able to provide high performance under tremendous load with minimal impact on functionality or latency times there’s no downtime!
- Finally, the third one is security.
What is Amazon S3?Amazon S3 is an AWS service that provides a safe place to store your data. It’s a cloud-based storage system, so there are no limits on space and you can access it from anywhere.
Are you hungry to learn more about hosting a static website using Amazon S3 by completing a practical example? Then let’s jump in.
- Login into AWS Management Console and search S3.
- Create a new Bucket or select an existing Bucket.
To create a new bucket follow the steps given in Create S3 Bucket and Objects
- Open the S3 Bucket dashboard and upload the HTML file and click on Upload.
- In S3 Bucket, open Properties.
- Select Edit in Block public access (bucket settings) in S3 Bucket Permissions.
- Inside Bucket S3 dashboard, Click on Permissions and then click on Edit in Bucket Policy.
- In Amazon Resource Name, Copy and Paste the ARN from Edit Bucket Policy Tab. Add “/*” after the ARN to apply this to all the objects inside Bucket.
- Click on Add Statement and then on Generate Policy.
- Copy the Policy JSON Document to the Policy editor and Save Changes.