AWS Storage Services: S3 and EBS - JPM2002/JPM2002 GitHub Wiki
📦 AWS Storage Services: S3 and EBS
AWS offers multiple storage options for different needs — from object storage to block storage. Two of the most widely used services are Amazon S3 and Amazon EBS.
🪣 Amazon S3 (Simple Storage Service)
Amazon S3 is a highly scalable object storage service used to store files, images, videos, backups, logs, and static websites.
Key Features
- Stores files as objects in buckets
- Built-in versioning and lifecycle policies
- 99.999999999% durability (11 9’s!)
- Public or private access control
- Integrates with nearly every AWS service
Use Cases
- Store images, videos, PDFs, documents
- Host static websites
- Backup and disaster recovery
- Data lakes and analytics
💡 Free Tier: 5 GB Standard storage, 20,000 GET, 2,000 PUT requests/month
💽 Amazon EBS (Elastic Block Store)
Amazon EBS provides block storage volumes that attach to EC2 instances — similar to a hard drive or SSD in the cloud.
Key Features
- Persistent disk storage for EC2
- Choose between SSD (gp3, io2) and HDD (st1, sc1)
- Snapshots for backup
- Resize volumes without downtime
Use Cases
- OS and app storage for EC2 instances
- High-performance workloads (e.g., databases)
- Store boot volumes
💡 Free Tier: 30 GB of EBS (gp2 or gp3), plus snapshots
🔍 S3 vs. EBS
Feature | Amazon S3 | Amazon EBS |
---|---|---|
Storage Type | Object storage | Block storage |
Access | HTTP-based via APIs | Attached to EC2 only |
Use Case | Static files, backups, websites | Running OS/apps on EC2 |
Scaling | Automatically scales | Must manually resize |
Durability | 11 9’s durability | Persistent but not globally redundant |
🧠 Tips
- Use S3 when storing files for sharing, backup, or public access
- Use EBS when your EC2 needs a fast, persistent drive
- Combine: Store logs/data on EBS and archive them periodically to S3