S3 Object Storage

💤0
Lv 10 XP
← 🟧 Amazon Web Services · Core Services

S3 Object Storage

Beginner ⭐ 50 XP ⏱ 18 min #aws#s3#storage

Store objects durably in S3, control access, and pick the right storage class.

📖Theory

S3 is object storage: you put objects (files + metadata) into buckets with globally unique names. It’s famously durable — eleven nines (99.999999999%) — and scales infinitely. Objects are accessed by key over HTTPS.

Storage classes trade access cost for storage cost:

  • Standard — frequent access
  • Intelligent-Tiering — auto-moves objects by access pattern
  • Standard-IA / One Zone-IA — infrequent access
  • Glacier / Glacier Deep Archive — cheap archival, slower retrieval

Secure with block public access (on by default), bucket policies, IAM, and encryption (SSE-S3/KMS). Lifecycle rules transition or expire objects; versioning protects against overwrites and deletes.

🌍Real-World Example
aws s3 mb s3://my-unique-bucket-name
aws s3 cp report.pdf s3://my-unique-bucket-name/reports/
aws s3 ls s3://my-unique-bucket-name/reports/

# Presigned URL: temporary access without making the object public
aws s3 presign s3://my-unique-bucket-name/reports/report.pdf --expires-in 3600
✍️Hands-On Exercise
  1. Choose a storage class for: a live website’s images, monthly backups, 7-year archives.
  2. Explain how a presigned URL shares an object without making the bucket public.
  3. Describe a lifecycle rule that moves objects to Glacier after 90 days.
  4. Why does S3 require globally unique bucket names?
🧾Cheat Sheet
FeatureDetail
Durability11 nines (99.999999999%)
StandardFrequent access
Intelligent-TieringAuto-tiers by access
GlacierCheap archival, slow retrieval
Block Public AccessOn by default — keep it
VersioningProtects against overwrite/delete
Presigned URLTemporary, scoped access
💬Common Interview Questions
How durable is S3 and what does that mean?

99.999999999% (eleven nines) durability — S3 redundantly stores objects across multiple devices and facilities, making data loss extraordinarily unlikely.

How do you give someone temporary access to a private S3 object?

Generate a presigned URL with an expiry, which grants time-limited access to that specific object without changing bucket permissions or making it public.

What are S3 storage classes for?

To match cost to access pattern — Standard for hot data, Standard-IA for infrequent, and Glacier classes for cheap long-term archival with slower retrieval.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type