Project Link: View Project
Author: dolaposalaam@outlook.com
Email: dolaposalaam@outlook.com
In this project, I’ll show how to host a static website using an Amazon S3 bucket. My goal is to learn the basics of cloud hosting and gain hands-on experience with AWS.
The service I used was Amazon S3. Key concepts I learned include ACLs vs. bucket policies, static website hosting, object storage, and public access settings.
This project took me about 2 hours to complete. The most challenging part was uploading the files correctly. The most rewarding part was encountering 403/404 errors and troubleshooting them successfully.
Creating an S3 bucket took me 2 minutes. The most challenging part was making the name unique
The Region I picked for my S3 bucket was eu-west-2 because this is the region closest to me.
S3 bucket names must be globally unique, meaning no other bucket across all of AWS can have the same name.
I uploaded two files to my S3 bucket: the index.html file and another file containing all the images used on the site.
Both files are necessary for this project: the index.html file defines the structure and layout of the website, while the images file contains all the images used. Without these, images may not display correctly, and errors could occur.
Website hosting allows my S3 bucket can act as a webserver giving aceess to and displaying the index.html file and images uploaded via a public UR.
To enable website hosting with my S3 bucket, I navigated to the properties tab and enabled static website hosting.
An ACL consists of rules that determine who can access the individual objects(website files) within my bucket.
Once static website hosting is enabled, S3 generates a bucket endpoint URL, which is a link that allows anyone to access the contents of the S3 bucket on a webpage
When I first visited the bucket endpoint URL, I encountered a 403 error. This occurred because, while the bucket was public, the contents were private and could not be accessed or displayed.
To resolve this 403 Forbidden error, I made all my objects public using ACL