Ravindra BagaleCourses & study guides

Chapter 13: Amazon EBS (Elastic Block Store)

13.1 What and why

Mitranno, sooner or later every server runs out of disk space — usually at the worst possible time. This chapter teaches you how to handle storage calmly. Let's first understand what EBS is. Amazon EBS provides block-level storage volumes — virtual hard disks — that you attach to EC2 instances. The root disk of almost every EC2 instance is an EBS volume.

Why EBS?

  • Persistent: data survives instance stop/start (unlike instance store, which is lost).
  • Flexible: increase size, change type or performance while the volume is in use.
  • Durable: automatically replicated within its Availability Zone.
  • Backups: point-in-time snapshots stored in Amazon S3 (managed by AWS), copyable across regions.
  • Encryption: one tick box (AWS KMS) encrypts data at rest, in transit to the instance and in snapshots.
 Availability Zone ap-south-1a
 +------------------------------------------------------------+
 |  EC2 instance                                              |
 |   ├── /dev/nvme0n1  (root EBS, gp3 8 GiB)  →  /            |
 |   └── /dev/nvme1n1  (data EBS, gp3 20 GiB) →  /data        |
 +------------------------------------------------------------+
            │ snapshot (incremental)
            ▼
     EBS Snapshots (regional, stored in S3) ──► create new volume in ANY AZ of the region

Key rules

  • An EBS volume lives in one Availability Zone and can only attach to instances in the same AZ. To move it to another AZ/region, take a snapshot and create a new volume from it.
  • Normally one volume attaches to one instance at a time (io1/io2 support Multi-Attach for special clustered workloads).
  • You pay for the provisioned size (GiB-month), even if the disk is empty and even while the instance is stopped.