Hosting a Static Website on S3

Hosting a Static Website on S3

Prerequisites

  • AWS Console Knowledge

  • S3 knowledge

Step 1 Create S3 Bucket

Create an S3 bucket and upload the file that has the scripts for the website.

Screenshot 2022-12-06 at 22.19.46.png

Step 2 Edit Public Access

Uncheck block public access because you need the public to access this wbesite

Screenshot 2022-12-06 at 22.19.57.png

Step 3 Edit Static Website Hosting

After creating the bucket, go to the bucket list and click on your bucket then navigate to properties and edit static website hosting

Screenshot 2022-12-06 at 22.48.39.png

Step 4 Edit Bucket Policy

Edit bucket policy with the policy or permissions you want. for the purpose of this tutorial it is a policy of PublicReadGetObject. This policy enables your bucket content to be available publicly. For easy editing, go to the policy generator icon and generate the policy, copy and paste it in the Bucket Policy Editor and save changes.

Screenshot 2022-12-06 at 22.55.26.png

Screenshot 2022-12-06 at 23.26.35.png

**Step 5 **

Copy your endpoint url and pate on your browser and you have your website running. As I have here.

Screenshot 2022-12-07 at 00.02.59.png

There you go! Feel free to check out my other articles here.