Deploying a Static Website on AWS S3: Step-by-Step Tutorial

Amazon S3 allows you to host static websites directly from the cloud. If you have an HTML, CSS, or JS project and want to share it online, S3 is a reliable and scalable option.

Step 1: Create an S3 Bucket

Log in to your AWS account. Navigate to S3 and create a new bucket. Use a unique name and enable public access.

Step 2: Upload Your Files

Upload your website files, including index.html and style.css. Set their permissions to public.

Step 3: Enable Static Website Hosting

In the bucket settings, go to the “Properties” tab and enable static website hosting. Set the index document as index.html.

Step 4: Access Your Website

You’ll get a public URL like this: http://your-bucket-name.s3-website-region.amazonaws.com. Share this link to access your site.

Bonus: Use a Custom Domain

If you have a domain, you can connect it to your S3 bucket using Route 53 and CloudFront for better performance.

With just a few steps, you can deploy and share your static website globally using AWS S3.

Comments

Popular posts from this blog

Docker for Beginners: Build, Ship, and Run Apps with Ease

Top 7 Real-World Projects to Learn React, Python, and AWS (Beginner to Advanced)