What You Will Learn
Intermediate
- What EBS is and when to use it
- Volume types (gp3, io2, st1)
- Snapshots for backup
EBS (Elastic Block Store) provides persistent block storage for EC2. Like a hard drive attached to your VM — data persists when the instance stops.
| Type | Use case | Price |
|---|---|---|
| gp3 | General purpose SSD (default) | $$ |
| io2 | High I/O (databases) | $$$ |
| st1 | Throughput (big data) | $ |
| sc1 | Cold storage | $ (cheapest) |
EBS vs S3
EBS: block storage, attached to one EC2, low latency, persistent. S3: object storage, accessed over network, not for OS/databases.Practical Exercise
Launch an EC2 instance
Create a 5 GB gp3 EBS volume
Attach it to the instance
SSH in, format and mount it:
mkfs.ext4 /dev/xvdf && mount /dev/xvdf /mntTake a snapshot of the volume
Key Takeaways
- EBS = persistent block storage for EC2 (like a hard drive).
- gp3: general purpose. io2: high I/O. st1: throughput. sc1: cold.
- Data persists when EC2 stops (unlike instance store).
- Snapshots backup volumes to S3.
- Free tier: 30 GB gp2/gp3 + 1M I/O.
Comments
Comments
Post a Comment