Amazon EBS (Elastic Block Store) provides persistent block volumes attached to EC2 instances—like a virtual hard drive. Instance store volumes are ephemeral; EBS survives stop/start (not terminate unless delete on termination is set).
Volume types (awareness)
- gp3/gp2 — general-purpose SSD (default root volumes)
- io1/io2 — high IOPS for databases
- st1/sc1 — throughput HDD for big sequential workloads
Snapshots
EBS snapshots are incremental backups stored in S3 (managed by AWS). Use them before risky changes or for AMI creation.
List volumes
aws ec2 describe-volumes \
--query 'Volumes[].{Id:VolumeId,Size:Size,State:State,AZ:AvailabilityZone}' \
--output tablePractice: Launch resources in the EC2 Console or CLI only in a sandbox account. Use t2.micro or t3.micro where free tier applies; terminate when done.
Cost tip
Detached EBS volumes still bill storage. Delete volumes and snapshots you no longer need. Root volume size above free tier limits charges monthly.
Important interview questions and answers
- Q: EBS vs instance store?
A: EBS is persistent network block storage; instance store is local ephemeral disks lost on stop/terminate. - Q: What is an EBS snapshot?
A: Point-in-time backup of a volume used for restore or creating new volumes/AMIs.
Self-check
- Name two EBS volume families and their typical use.
- Why delete unattached EBS volumes in a sandbox?
Pitfall: Forgotten detached EBS volumes still bill monthly—audit with describe-volumes.
Interview prep
- EBS vs instance store?
EBS persists across stop/start; instance store is ephemeral local disk.
- Snapshot?
Incremental backup of EBS volume used for restore or AMI creation.