How To Create a Static Website with AWS S3 in 2021
This article will help you understand and create a static website using AWS S3,
Amazon Simple Storage Service (S3) is a powerful service of AWS that can help you store an unlimited amount of data in the AWS cloud. Read more here
Let’s get started
To create a static website using AWS S3 service,
Go to the AWS Console and click on create a bucket
1- Create a Bucket.
Please note that the bucket has be globally unique so choose a unique name 🙂
2- Make your bucket public.
There are multiple ways to make a bucket public,
a)- You can simply uncheck the below box while creating your bucket
b)- After your bucket is created, click on your bucket –> Permissions –> then uncheck the boxes as shown in the below picture.
3- Upload an index.html file
In order to have your website up and running using S3, you have to create and upload an HTML file into your S3 bucket.
Click on the Bucket –> Click on Upload –> choose the file –> choose your file and click upload
Here is a quick HTML file, Name it index.html
<HTML> <body>Hello U-learn Hub, Your career's magazine </body> </HTML>
3- Now make the object (index.html) public as well.
a) Click on the bucket
b) Localized your index.html file and make sure it’s selected
c) Click on Object Action
d) Make public
5- Let’s enable Static website hosting
6- Let’s check our web page.
Go back to static web hosting and copy the endpoint link and paste it in any browser.