Project Description
The project involves hosting a static website using an AWS S3 bucket. Amazon S3 is an object storage service that provides a simple web services interface to store and retrieve any amount of data. The website files will be uploaded to an S3 bucket and configured to function as a static website. The bucket will be configured with the appropriate permissions and a unique domain name, making the website publicly accessible. Overall, the project aims to leverage the benefits of AWS S3 to host and scale a static website in a cost-effective and scalable manner.
Create an S3 Bucket
Log in to the AWS Management Console and navigate to the S3 service.
Click on “Create bucket”.
Provide a unique bucket name.
- Click on “Create bucket”.
Upload Your Website Files
- Open your newly created bucket.
Click on “Upload” and select your website files to upload them to the bucket.
After selecting the files, click on “Upload”.
Enable Static Website Hosting
- Navigate to bucket properties and edit "Static website hosting".
Edit Block Public Access
Uncheck “Block all public access” settings and acknowledge that so the bucket will be publicly accessible.
Set Bucket Permissions
In order to make the content publicly accessible, you need to modify the policy.
Navigate to the Permission tab of your bucket, go to "Bucket policy" and click on "Edit"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::project-3-day-82/*"
}
]
}
Click on "Save changes" to apply the policy.
Access Your Website
- Upon successful configuration, your website should be reachable at the S3 endpoint URL.
Thank you for reading.