Day 82 Task: Project-3

CHANDRESH PATLECHANDRESH PATLE
3 min read

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.

🔶 Task: Hosting a static website on AWS S3

Hosting a static website on AWS S3 is a straightforward and cost-effective way to make your content accessible to a global audience. The key steps to this project involve setting up your S3 bucket, configuring it for static website hosting, and securing your content with appropriate permissions.

Here's a step-by-step guide:

1. Set Up an AWS Account:

  • If you don't already have one, create an AWS account.

2. Create an S3 Bucket:

  • Sign in to the AWS Management Console.

  • Open the S3 console and click "Create bucket."

  • Choose a unique and relevant name for your bucket, e.g., "yourwebsite.com."

  • Select the AWS region that's geographically closest to your target audience for faster content delivery.

3. Upload Your Website Files:

  • Navigate to your new S3 bucket.

  • Click "Upload" and select the HTML, CSS, JavaScript, and other files that make up your website.

  • Ensure that your main HTML file is named "index.html" or "index.htm."

4. Enable Static Website Hosting:

  • In your bucket properties, go to the "Static website hosting" section.

  • Click "Use this bucket to host a website" and specify the index document (e.g., index.html) and error document (e.g., error.html).

5. Set Permissions:

  • In the "Permissions" tab, configure bucket policies to allow public access. Create a bucket policy like the following:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::yourwebsite.com/*"
        }
    ]
}

This policy allows anyone to access the objects in your bucket.

6. Obtain Your Website Endpoint:

7. Test Your Website:

  • Open a web browser and enter your website's URL. It should load your static website hosted on S3.

8. Content Updates:

  • Whenever you need to update your website, simply upload the new content to your S3 bucket. AWS will take care of the rest.

By following these steps, you'll have a cost-effective, scalable, and reliable platform for hosting your static website. AWS S3's performance and availability ensure that your content reaches your audience with low latency and high uptime.


Happy Learning :)

Stay in the loop with my latest insights and articles on cloud ☁️ and DevOps ♾️ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).

Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes #Terraform #AWS #Grafana

1
Subscribe to my newsletter

Read articles from CHANDRESH PATLE directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

CHANDRESH PATLE
CHANDRESH PATLE

Hi, I'm Chandresh Patle, an aspiring DevOps Engineer with a diverse background in field supervision, manufacturing, and service consulting. With a strong foundation in engineering and project management, I bring a unique perspective to my work. I recently completed a Post Graduate Diploma in Advanced Computing (PG-DAC), where I honed my skills in web development, frontend and backend technologies, databases, and DevOps practices. My proficiency extends to Core Java, Oracle, MySQL, SDLC, AWS, Docker, Kubernetes, Ansible, Linux, GitHub, Terraform, Grafana, Selenium, and Jira. I am passionate about leveraging technology to drive efficient and reliable software delivery. With a focus on DevOps principles and automation, I strive to optimize workflows and enhance collaboration among teams. I am constantly seeking new opportunities to expand my knowledge and stay up-to-date with the latest industry trends. If you have any questions, collaboration ideas, or professional opportunities, feel free to reach out to me at patle269@gmail.com. I'm always open to connecting with fellow tech enthusiasts and exploring ways to contribute to the DevOps community. Let's build a better future through innovation and continuous improvement!