Amazon S3
Simple Storage Service — AWS's object storage for files (images, videos, backups, logs). S3 stores files as 'objects' in 'buckets' with near-infinite scale and 99.999999999% durability. The standard for cloud file storage. Cheap for storage, but data transfer out costs money.
- Storing user uploads (images, videos).
- Backups and archives.
- Static website hosting.
- Data lakes.
- Log storage.
- Block storage (use EBS).
- Frequently updated structured data (use a database).
- Low-latency hot data (use a CDN or cache).
Definition
S3 is AWS's object storage. You store objects (files + metadata) in buckets. 11 nines durability (redundant copies). Tiers: Standard, Infrequent Access, Glacier (archive). Versioning, lifecycle policies, encryption. Static website hosting. Presigned URLs for temporary access. Cross-region replication.
Why it exists
To provide durable, scalable, cheap storage for any amount of data without managing disks — used for backups, media, logs, static sites, data lakes.
How it works
Create a bucket (globally unique name). PUT objects (files) with keys (paths). GET to retrieve. Set permissions (public, private, presigned URLs). Lifecycle rules move old data to cheaper tiers. Versioning keeps all versions. CloudFront CDN caches objects globally.
Scaling limits
Data transfer OUT of S3 to the internet costs money (egress). Not a filesystem (no rename, eventual consistency for some ops). 5TB max object size. Bucket naming is global. List operations are eventually consistent (mostly resolved now).
Cost shape
Storage: ~$0.023/GB/month (Standard). Requests: per-1000. Data transfer OUT: ~$0.09/GB. Glacier: ~$0.004/GB. Free tier: 5GB.
Alternatives
- Google Cloud Storage — Similar, GCP ecosystem.
- Cloudflare R2 — No egress fees, S3-compatible, newer.
- Backblaze B2 — Cheaper, simpler, fewer features.
Failure modes
- Public bucket misconfiguration (data leaks).
- Egress costs.
- Eventual consistency edge cases.
- Bucket name collisions.