Amazon S3
Amazon Simple Storage Service (S3) is object storage built to store and retrieve any amount of data from anywhere. It's one of AWS's oldest and most reliable services, forming the backbone of countless applications.
Key Concepts
- Buckets: Containers for objects (globally unique names)
- Objects: Files and their metadata (up to 5 TB each)
- Keys: Unique identifiers for objects within a bucket
- Prefixes: Folder-like organisation (though S3 is flat)
Storage Classes
| Class | Use Case | Retrieval |
|---|---|---|
| Standard | Frequently accessed data | Immediate |
| Intelligent-Tiering | Unpredictable access patterns | Automatic |
| Standard-IA | Infrequent access | Immediate |
| One Zone-IA | Non-critical infrequent data | Immediate |
| Glacier Instant | Archive with instant access | Milliseconds |
| Glacier Flexible | Long-term archive | Minutes to hours |
| Glacier Deep Archive | Coldest data | 12-48 hours |
Common Use Cases
- Static website hosting: Serve HTML, CSS, JS via CloudFront
- Data lake: Store raw data for Athena or analytics
- Backup and archive: Durable, cost-effective storage
- Application assets: Images, videos, documents
- Log storage: Application and access logs
What We Like
- Durability: 99.999999999% (11 9s) durability
- Availability: 99.99% with Standard class
- Scalability: No limits on storage or throughput
- Versatility: Works for nearly any storage use case
- Integration: Native support across all AWS services
What We Don't Like
- Consistency model: Strong consistency is now default, but old habits die hard
- Cost complexity: Multiple dimensions (storage, requests, transfer)
- Bucket naming: Global uniqueness requirement can be frustrating
- No append: Objects are immutable; must rewrite entirely
Security Best Practices
- Block public access by default at the account level
- Use bucket policies for access control
- Enable versioning for critical data
- Enable encryption (SSE-S3, SSE-KMS, or client-side)
- Enable access logging for audit trails
- Use VPC endpoints to keep traffic private