Project 2: Host a static website using AWS S3 bucket.

Day 82 of #90daysofdevops challenge

Project 2: Host a static website using AWS S3 bucket.

Table of contents

No heading

No headings in the article.

The project aims to host a static website using AWS S3, an object storage service known for its simplicity and scalability. Website files will be uploaded to an S3 bucket and configured for static website functionality. With appropriate permissions and a unique domain name, the website becomes publicly accessible. Leveraging AWS S3 ensures a cost-effective and scalable solution for hosting static websites. 🌐🚀

  • In the AWS management console, Create an Amazon S3 bucket service.

  • Now, Choose a unique bucket name and select a region

  • Enable the Bucket versioning

  • Click on Create a bucket

  • The bucket is successfully created.

  • Once your bucket is created, upload your website files to the bucket. Click on ‘Upload’

  • Click on ‘Add files’ to add website files.

  • Go to the “Properties” tab and Scroll down to the bottom and Edit “Static Website Hosting”.

  • Enable Static website hosting. Set the “Index Document” to “index.html”

  • Save the changes

  • Set the bucket permissions to allow public access to your website. Go to the “Permissions” tab and click on “Bucket Policy” and edit
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::Bucket-Name/*"
            ]
        }
    ]
}

  • Browse the bucket website URL. You should now be able to access your static website using the bucket’s URL.


Thank you for enjoying my DevOps blog! Your positive response fuels my passion to dive deeper into technology and innovation.

Stay tuned for more captivating DevOps articles, where we'll explore this dynamic field together. Follow me on Hashnode and connect on LinkedIn (https://www.linkedin.com/in/som-shanker-pandey/) for the latest updates and discussions.

Did you find this article valuable?

Support Som Pandey's blog by becoming a sponsor. Any amount is appreciated!