
From Zero to AWS: A Beginner's First Cloud Project
Learn cloud fundamentals by building and deploying a secure static website on Amazon S3 and CloudFront using Origin Access Control and Free Tier guardrails.
Introduction βοΈ
Starting out with cloud computing can feel overwhelming. With hundreds of services, technical terms, and architecture choices, it's easy to get lost in documentation.
The most effective way to learn AWS isn't memorizing theoretical conceptsβit's building a tangible project end-to-end. In this tutorial, you will build and deploy a developer portfolio website using Amazon S3 and Amazon CloudFront, applying security best practices and cost guardrails along the way.
What You Will Learn π§
- π¦ Amazon S3 Essentials: Storing static web assets securely in object storage buckets.
- β‘ Global CDN Delivery: Serving files globally over HTTPS with low latency using Amazon CloudFront.
- π Least-Privilege Security: Keeping storage buckets private using CloudFront Origin Access Control (OAC).
- π° Cost Control: Setting up billing alarms to stay comfortably within the AWS Free Tier.
Architecture Overview π
Here is the production-grade setup you will build:
[ User Browser ]
[ User Browser ]
β
βΌ (HTTPS)
βββββββββββββββββββββββββββββββββββ
β Amazon CloudFront CDN β
βββββββββββββββββββββββββββββββββββ
β
βΌ (Origin Access Control / OAC)
βββββββββββββββββββββββββββββββββββ
β Amazon S3 Bucket (Private) β
βββββββββββββββββββββββββββββββββββ
π Security Note: Instead of making your S3 bucket publicly readable directly, keeping the bucket private and routing web traffic exclusively through CloudFront OAC prevents direct bucket exposure.

Step-by-Step Implementation π οΈ
Step 1: Create Local Website Files π
Create a folder on your computer containing two files:
index.html and styles.css.index.html:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Cloud Portfolio</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>π Hello, I'm Ram</h1>
<p>AWS Student Builder | Cloud Engineering Enthusiast</p>
</header>
<main>
<section>
<h2>π My First AWS Deployment</h2>
<p>This static portfolio is stored securely in Amazon S3 and delivered globally via Amazon CloudFront CDN.</p>
</section>
</main>
</body>
</html>styles.css:
1
2
3
4
5
6
7
8
9
10
11
12
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
max-width: 800px;
margin: 40px auto;
padding: 0 20px;
background-color: #f8fafc;
color: #0f172a;
}
header {
border-bottom: 2px solid #e2e8f0;
padding-bottom: 20px;
}Step 2: Configure Amazon S3 Bucket π¦
- Open the AWS Management Console and navigate to S3.
- Click Create bucket and choose a unique bucket name (e.g.,
student-portfolio-2026-demo). - Select your preferred AWS Region (e.g.,
us-east-1). - β οΈ Leave "Block all public access" ENABLED. Do not disable public access.
- Click Create bucket, open your newly created bucket, and upload your
index.htmlandstyles.cssfiles.
Step 3: Configure CloudFront & Origin Access Control (OAC) β‘
- Open the CloudFront Console and click Create distribution.
- In Origin domain, select your S3 bucket's domain name.
- Under Origin access, select Origin Access Control settings (recommended) and click Create control setting.
- Under Viewer protocol policy, select Redirect HTTP to HTTPS.
- Set Default root object to
index.html. - Click Create distribution.
- Copy the generated Bucket Policy on the CloudFront setup completion screen, navigate back to your S3 bucket's Permissions tab, and save it under Bucket Policy.
Step 4: Set Up Billing Guardrails π¨
- Navigate to AWS Budgets in the Billing & Cost Management Console.
- Select Create budget β Zero spend budget.
- Enter your email address to receive real-time alerts if any resource incurs charges.
Key Takeaways π‘
- Private by Default: Keeping S3 buckets private while delivering content through CloudFront CDN is the recommended security baseline for web hosting.
- Free Tier Friendly: S3 provides 5 GB of storage, while CloudFront provides 1 TB of monthly outbound data transfer free for new accounts.
- CDN Caching: Edits made to files in S3 may take a few minutes to update globally due to CloudFront edge caching. Creating a CloudFront Invalidation updates cached content instantly.
What to Try Next π―
- π Connect a custom domain name using Amazon Route 53.
- π Automate deployments using a GitHub Actions CI/CD pipeline.
- π Enforce security headers using CloudFront Functions.
Happy Cloud Building! π
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article