What Is AWS S3?
Object Storage vs. File Storage
A traditional file system organizes data in folders and files with a hierarchy. S3 uses object storage — a flat structure where every file (called an object) is stored in a bucket and identified by a unique key (the file path).
Bucket: my-app-uploads
└── Key: profile-photos/user-123/avatar.jpg → Object (the actual file)
└── Key: documents/invoice-2024.pdf → Object
There are no real "folders" — the slash in the key is just a naming convention that tools display as a folder structure.
Core Concepts
Bucket
A bucket is the top-level container for objects. Bucket names must be globally unique across all of AWS (not just your account). You choose which AWS region the bucket lives in — data stays there unless you configure replication.
s3://my-app-uploads/ ← bucket
s3://my-app-uploads/logo.png ← object inside the bucket
Object
An object is the file stored in S3, plus its metadata (content type, size, last modified, custom tags). Objects can be anywhere from 0 bytes to 5 TB.
Key
The key is the full path of the object within the bucket — profile-photos/user-123/avatar.jpg. The combination of bucket + key uniquely identifies any object in S3.
Access Control
S3 has multiple layers of access control:
| Mechanism | Controls |
|---|---|
| Block Public Access | Account/bucket-level toggle to prevent accidental public exposure |
| Bucket Policy | JSON policy applied to the entire bucket (e.g., allow public reads) |
| IAM Policy | Grants AWS users/roles access to S3 operations |
| Pre-signed URLs | Time-limited URLs for temporary access to private objects |
| ACLs | Legacy per-object access control (AWS recommends policies over ACLs now) |
For most apps: keep the bucket private, use IAM roles for server-side access, and pre-signed URLs for temporary client-side access.
Storage Classes
S3 offers multiple storage classes with different availability and price trade-offs:
| Class | Use Case | Retrieval |
|---|---|---|
| Standard | Frequently accessed data | Milliseconds |
| Standard-IA | Infrequently accessed | Milliseconds |
| Glacier Instant | Archive, accessed occasionally | Milliseconds |
| Glacier Flexible | Long-term archive | Minutes to hours |
| Glacier Deep Archive | Rarely accessed, lowest cost | Up to 12 hours |
Intelligent-Tiering automatically moves objects between tiers based on access patterns — useful when you're not sure how often data will be accessed.
Static Website Hosting
S3 can serve a static website directly — no server required. This works perfectly for React, Vue, or Angular apps built with npm run build.
Enable it in the bucket settings:
- Go to Properties → Static website hosting
- Set the index document (
index.html) and error document - Apply a bucket policy to allow public reads
- Your site is live at
http://<bucket-name>.s3-website-<region>.amazonaws.com
For a custom domain and HTTPS, put CloudFront in front of the bucket.
Key S3 Facts
- Durability: 99.999999999% — S3 replicates objects across multiple AZs automatically
- Eventual consistency: After a write, reads may briefly return the old version (usually resolves in milliseconds)
- Max object size: 5 TB (objects over 5 GB must use multipart upload)
- Pricing: Charged for storage (GB/month), requests, and data transfer out