Hosting a Static Resume Portfolio Website on S3 - A Step-by-Step Guide

Manav RajpalManav Rajpal
2 min read

Introduction (This is just a sample resume)
Amazon S3 (Simple Storage Service) is a scalable, secure, and cost-effective solution for object storage. But did you know you can also use it to host static websites? This blog is your step-by-step guide to hosting a website on S3, packed with tips to level up your cloud knowledge.


Step 1: Creating an S3 Bucket

🔹 Go to the AWS Management Console, create a unique bucket name, and choose a region close to your audience.


Step 2: Understanding Object Ownership

🔸 Learn how object ownership determines control. Options include Bucket Owner Preferred and Object Writer settings for collaboration.


Step 3: Configuring Public Access Settings

🔹 By default, S3 blocks public access. Enable it for specific use cases, ensuring your bucket is secure yet accessible.


Step 4: Enabling Bucket Versioning

🔸 Protect your data with versioning. Retrieve earlier versions in case of accidental overwrites or deletions.


Step 5: Encrypting Data in S3

🔹 Use server-side encryption (SSE-S3 or SSE-KMS) to secure your files with minimal effort.


Step 6: Using Object Lock

🔸 Prevent unwanted deletions or modifications with Object Lock’s governance and compliance modes.


Step 7: Configuring Intelligent-Tiering

🔹 Save costs by setting up automatic tiering based on file access patterns. Explore lifecycle rules for archiving unused data.


Step 8: Setting Up Static Website Hosting

🔸 Enable website hosting under bucket properties, upload index.html and error.html, and define the root and error documents.


Step 9: Solving the 403 Forbidden Error

🔹 Grant public read access by creating a bucket policy:

jsonCopy code{  
  "Version": "2012-10-17",  
  "Statement": [  
    {  
      "Effect": "Allow",  
      "Principal": "*",  
      "Action": "s3:GetObject",  
      "Resource": "arn:aws:s3:::<bucket-name>/*"  
    }  
  ]  
}

Step 10: Uploading Files

🔸 Use the AWS Console or CLI to upload index.html and error.html. Verify the site using the provided endpoint.


Step 11: Using IAM Users & AWS CLI

🔹 Grant an IAM user permissions for bucket operations.
🔸 Use CLI commands for efficient updates:

bashCopy codeaws s3 cp index.html s3://<bucket-name>/ --acl public-read

Conclusion
Hosting a static website on S3 is a beginner-friendly yet powerful project. It’s not just about hosting; it’s about mastering AWS fundamentals like permissions, versioning, and encryption. Whether you’re a student or a professional, this is your first step toward becoming an AWS expert.

Let’s Connect:
Did this guide help you? Share your experience in the comments or tag someone who’d benefit from it. Keep learning, keep growing! 🌐

0
Subscribe to my newsletter

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

Written by

Manav Rajpal
Manav Rajpal