AWS & Modern Cloud Architecture · Chapter 2 · ~15 min · Beginner
Storage & Static Web Hosting with Amazon S3
Discover why Amazon S3 is the backbone of the internet: store files with 99.999999999% durability, understand buckets and object keys, and host lightning-fast static websites without managing servers.
- Learn what Object Storage is and how it differs from hard drives
- Create globally unique buckets and organize files with Keys
- Host production websites on S3 without running expensive EC2 servers
- Master S3 Block Public Access and Bucket Policies
1Amazon S3: An Infinite Hard Drive in the Cloud
S3 stands for Simple Storage Service. Launched in 2006, it was the very first service Amazon AWS ever released.
On a normal laptop or virtual machine, your hard drive has a fixed size (like 512 GB). If you run out of space, the system crashes. With Amazon S3, you can upload 1 photo or 10 billion video files; it automatically scales infinitely without you ever having to configure disk partitions or resize volumes.
Best of all, Amazon stores multiple copies of every file across at least 3 separate physical data centers, providing 99.999999999% (11 nines) durability. That means if you store 10,000,000 files on S3, on average you would lose only one file every 10,000 years!
What does 99.999999999% (11 nines) durability in Amazon S3 mean?
2Buckets & Objects: How S3 Organizes Data
Unlike Windows or macOS folders, S3 is an Object Store. It consists of two simple concepts:
1. The Bucket (Top-Level Container)
A bucket is like a top-level storage container. The #1 rule: S3 bucket names must be globally unique across all AWS accounts worldwide! If another company took my-bucket, you cannot use it.
2. The Object (File + Key)
An object is the file itself (up to 5 TB per file!), identified by its Key (e.g. assets/images/header.jpg).
Why must an Amazon S3 bucket name be globally unique across the entire world?
3Hosting Websites on S3 (No Servers Required!)
If your website or web application is built with HTML, CSS, JavaScript, or React, you do not need to pay for a running EC2 virtual server!
You can enable Static Website Hosting on your S3 bucket. S3 acts as a high-speed web server, delivering your HTML files directly to visitors around the globe for a fraction of a penny per month.
// 1. Upload your web build files to S3:
s3://my-company-site/index.html
s3://my-company-site/style.css
s3://my-company-site/app.js
// 2. S3 generates an instant web endpoint:
http://my-company-site.s3-website-us-east-1.amazonaws.comWhat kind of websites can be hosted directly on an Amazon S3 bucket?
4The Public Access Trap & Bucket Policies
Years ago, inexperienced companies stored sensitive customer spreadsheets in S3 and accidentally made them public, leading to news headlines about data leaks.
In response, AWS created Block Public Access. By default, every S3 bucket is 100% private. Even if you enable website hosting, visitors will see a 403 Forbidden error until you explicitly configure a Bucket Policy allowing public read access:
Clean Public Read Bucket Policy (JSON):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-portfolio-site-2026/*"
}
]
}Why does AWS enable 'Block Public Access' by default on every newly created S3 bucket?
5Hands-On: Configure and Host a Website on S3
Use the interactive console below to configure an S3 bucket, inspect uploaded objects, and toggle website hosting and public read access:
Amazon S3 Bucket & Web Hosting Console
s3://my-portfolio-site-2026/3 objects| Key (Filename) | Size | Content-Type | Permissions |
|---|---|---|---|
| index.html | 1.4 KB | text/html | Private |
| style.css | 3.2 KB | text/css | Private |
| logo.png | 24.5 KB | image/png | Private |
Toggle "Enable Website Hosting" and "Allow Public Read Policy" above to publish your website!
6Chapter Knowledge Challenge
Test your Amazon S3 object storage, static website hosting, and security policy knowledge:
Why must every Amazon S3 bucket name be globally unique across all AWS accounts worldwide?
What is the biggest advantage of hosting a static portfolio or documentation site on S3 vs EC2?
7Recap
- Amazon S3 is an infinite, highly durable (11 9's) object storage service for files, media, and backups.
- Files are stored in Buckets, which must have globally unique names worldwide.
- Each file is an Object identified by a unique Key (path name).
- S3 can host high-traffic Static Websites directly without paying for a running server.
- S3 blocks public access by default; you must attach a Bucket Policy to allow public read access for websites.
Congratulations on completing Chapter 2! Mark as complete to update your syllabus: