April 2024

How I host a website on Amazon S3?

In this project, I:

Step 1: Create a S3 bucket

create bucket screenshot

Make sure ACLs, public access and bucket versioning are enabled.

Key notes ✏️:

What's ACL?

Access control list - A set of rules that decides who can get access to a resource.

Why need a unique bucket name?

An S3 bucket name is globally unique, and all AWS accounts share the namespace. After you create a bucket, no other AWS accounts in the entire world can use your bucket's name unless you delete the bucket.

Step 2: Upload website files into the bucket

upload files screenshot

Step 3: Time to host the website!

Scroll allllllllll the way down to the Static website hosting panel to enalble hosting.

screenshot of website hosting panel screenshot of bucket versioning

Step 4: Add bucket versioning

screenshot of bucket versioning

Step 5: Using a bucket policy to secure the bucket

If you want to protect your HTML file that no one can delete them. You can apply a bucket policy!

screenshot of bucket versioning

Voila! Now no one can delete your bucket without permission!

Big thanks to @NextWork for setting up this engaging challenge!