Day 82- 90DaysOfDevOps
Project 3- Host Static Website on S3 Bucket

Hey Learners! Welcome back. This is the third project of 90DaysOfDevOps challenge. In the last project we have successfully build, test, push, and deploy web application with declarative syntax in Jenkins. In this project we'll host a static website using an AWS S3 Bucket. Let's do the same...
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. Let's start...
Steps:-
Create S3 Bucket
Search for S3, select Buckets from left pane and click Create bucket. Enter appropriate name and click Create bucket.

Upload website files
Click on Upload and upload the required files for web page

Enable static Website hosting
Go to Properties tab make Static website hosting enable by clicking Edit.

Access your website
Copy the endpoint of the bucket from Static website hosting section and paste on URL section of any browser. Access denied.

Set Permissions
As Access is denied we have to disable Block public access from Permissions tab.

Define Bucket policy as given below and save the changes.
{
"Version": "2012-10-17",
"Id": "Policy1707672033984",
"Statement": [
{
"Sid": "Stmt1707672032022",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::<Bucket-Name>/*"
}
]
}

Access static website from URL
Now you can copy the same URL and check the web page hosted on S3 bucket.

This is hoe you can host your static website with the help of S3 bucket.
Thank you so much for taking the time to read till the end! Hope you found this blog informative.
Feel free to explore more of my content, and don't hesitate to reach out if need any assistance from me or in case of you have any questions.
Find me on:- HashnodeLinkedInGithub
Happy Learning!




