S3 - Simple Storage Service
S3 is object storage with 11 nines of durability. It stores any file as a key-value pair inside a bucket, accessible via HTTP.
What is AWS S3 (Simple Storage Service)?
S3 (Simple Storage Service) is AWS's object storage. Unlike a file system, S3 stores objects (files) as flat key-value pairs inside named containers called buckets. Each object has a key (path-like string), the data (up to 5 TB), and metadata.
S3 guarantees 99.999999999% (11 nines) durability - it replicates data across >=3 AZs in a region automatically.
Core Concepts
- Bucket: global namespace container. Bucket names are globally unique across all AWS accounts.
- Key: full path string - e.g.,
images/users/avatar_123.png. There are no real directories; the/is just part of the key name. - Object: the stored data + metadata. Max size 5 TB; multipart upload required for objects >5 GB.
- Versioning: optionally store all versions of an object. Protects against accidental deletion.
Storage Classes
| Class | Use For | Retrieval | Cost |
|---|---|---|---|
| Standard | Frequently accessed | Milliseconds | Highest |
| Intelligent-Tiering | Unknown access patterns | Milliseconds | Auto-tiers |
| Standard-IA | Infrequent access | Milliseconds | Lower storage, retrieval fee |
| One Zone-IA | Non-critical infrequent | Milliseconds | Cheapest IA, single AZ |
| Glacier Instant | Archives accessed sometimes | Milliseconds | Very low |
| Glacier Flexible | Long-term archive | Minutes to hours | Low |
| Glacier Deep Archive | 7+ year compliance | 12 hours | Lowest |
Use Lifecycle policies to automatically transition objects between classes (e.g., Standard -> Standard-IA after 30 days -> Glacier after 90 days -> delete after 365 days).
Access Control
- Block Public Access: account or bucket level switch - blocks all public ACLs and bucket policies. On by default.
- Bucket policy: JSON IAM policy attached to bucket. Controls cross-account access, conditions.
- ACLs: legacy per-object ACLs. Avoid in new designs - use bucket policies instead.
- Pre-signed URLs: time-limited signed URL granting temporary access to a specific object. Use to let users upload/download without exposing credentials.
S3 as a Static Host
Enable static website hosting on a bucket to serve index.html and error.html directly over HTTP. Combine with CloudFront for HTTPS, custom domain, and CDN caching.
Event Notifications
S3 can trigger events on object create/delete -> destinations: Lambda, SQS, SNS, EventBridge. Common pattern: upload image -> S3 event -> Lambda -> resize + store thumbnail.
S3 Select and Athena
- S3 Select: run simple SQL on CSV/JSON/Parquet objects directly in S3, returning only matching rows. Reduces data transfer.
- Athena: serverless query engine that runs SQL over S3 data using Glue Data Catalog schema. Pay per query. Used for log analytics, ad-hoc data exploration.
Consistency Model
As of 2020, S3 provides strong read-after-write consistency for all operations (PUT, DELETE). After a successful write, all reads return the new data immediately. Previously eventually consistent - this change eliminated a whole class of S3 bugs.
Multipart Upload
For large files (required >5 GB, recommended >100 MB):
- Initiate multipart upload -> get upload ID
- Upload parts (minimum 5 MB each, up to 10,000 parts)
- Complete upload -> S3 assembles the final object
Failed parts can be retried independently.
Interview Angle
S3 questions focus on: choosing the right storage class + lifecycle policies for cost, security (pre-signed URLs, bucket policies, block public access), and event-driven patterns (S3 -> Lambda pipelines). Also know the strong consistency model change in 2020. For large-scale analytics, mention Athena + Parquet for columnar queries.
Recommended Resources
AWS Solutions Architect Course
Comprehensive SAA-C03 prep with hands-on labs and practice exams.
AWS Solutions Architect Study Guide (SAA-C03)
900 practice questions + full SAA-C03 coverage by Sybex.
AWS Cloud Practitioner Study Guide (CLF-C02)
500 practice questions for the AWS Foundational certification.
AWS AI Practitioner Study Guide (AIF-C01)
Foundational prep for the AWS Certified AI Practitioner exam.
Ultimate AWS Certified Developer Associate 2026 (DVA-C02)
Top-rated DVA-C02 course by Stephane Maarek - hands-on labs and practice tests.
Ultimate AWS Certified AI Practitioner AIF-C01
Foundational AI/ML on AWS - Bedrock, SageMaker, and generative AI concepts.
AWS Certified Machine Learning Engineer Associate (MLA-C01)
Hands-on MLA-C01 prep covering MLOps, model deployment, and AWS AI services.
A Cloud Guru - AWS
Video-first cloud training with sandbox environments.