Host a Static Website on S3
Host a Static Website on S3

Start to build a static website to know how it works!

Create the bucket

Please go to s3 and create new bucket with unique name in  AWS console.

Guarantee you disclose this by unticking "Block all community".

Then, at that point, click "Next" until you can click "Make pail".

Can made!


Enable static Website setting

Click on the can you recently made, click"Properties", and afterward "Static site facilitating".

Presently select "Utilize this pail to have a site", type "index.html" and "error.html" into the underneath fields, and snap "Save".

Additionally note the URL. This address is where our site will be facilitated.

Upload a public picture

I've downloaded a picture of canines in party caps from Pexels. Download a picture or pick one you have locally.

Click on the pail, select "Transfer", simplified your picture and snap "Next".

Presently prior to concluding the transfer, guarantee you " Grant public read access ".

Then complete the transfer.

Picture transferred!


Make index.html

Select the picture you just transferred in S3 and duplicate it's public URL. We'll require this in a moment.

Then in a nearby code supervisor, make a document called "index.html", and glue in the accompanying.

Then, at that point, update the URL in the <img> tag with your own.

Presently transfer your "index.html" document to S3, very much like you recently did with the picture.

View the site

Explore to the URL given in the "Static Web Hosting" segment and you ought to see your website!

Login or create account to leave comments