Object storage (like S3) stores unstructured binary data — images, videos, documents — as objects with unique keys. It's infinitely scalable, cheap, and the standard for media storage in modern applications.
Object storage stores data as discrete objects (files) in flat namespaces (buckets). Unlike file systems (hierarchical) or block storage (fixed-size blocks), object storage is designed for:
Examples: AWS S3, Google Cloud Storage, Azure Blob Storage, Cloudflare R2, MinIO
The top-level container for objects. Global namespace (bucket names must be unique across all users). Configure access policies, versioning, and lifecycle rules at the bucket level.
Each object has:
users/avatar/abc123.jpg)Objects are accessed via HTTP(S) URLs:
https://bucket-name.s3.amazonaws.com/path/to/file.jpg
| Use Case | Pattern | |---|---| | User avatar uploads | Client uploads to pre-signed URL → Store key in DB | | Video storage | Upload to S3 → Transcode via worker → Store CDN URL | | Static website assets | S3 + CloudFront CDN | | Application backups | Nightly dump to S3 Glacier | | Data lake | Raw data in S3 → Query with Athena/Spark | | Audit logs | Stream to S3 → Long-term retention |
A critical pattern: never proxy file uploads through your server. Instead:
Benefits:
Client → POST /api/upload-url → Server → S3 generates URL
Client → PUT https://s3.amazonaws.com/bucket/file?X-Amz-Signature=... → S3
Client → POST /api/upload-complete → Server → DB saves key
| S3 Class | Use Case | Cost | |---|---|---| | Standard | Frequently accessed | Highest | | Standard-IA | Infrequently accessed | Lower | | One Zone-IA | Reproducible, infrequent | Lower | | Glacier Instant | Archives, occasional access | Much lower | | Glacier Deep Archive | Long-term archival | Cheapest |
Lifecycle policies automatically move objects between classes based on age — e.g., move to Glacier after 90 days.
Durability is about data survival. Availability is about being able to access it.