Skip to the workspace
Pebellslearn by building
EC2 — Virtual Servers  ›  Lesson

EBS Volumes and Instance Store

Storage / Volumes 12 minEC2 instances store data either on EBS volumes, network drives that persist independently of the instance, or on instance store disks that are fast but lose their data when the instance stops.

aws / EBS Volumes and Instance Store

Explore each scene at your own pace.

01 · The rule

The rule

EBS Volumes and Instance Store

Inkwell stops its server overnight to save money. In the morning the order database is fine, but a folder of processed images has vanished. Nothing crashed. The two folders simply lived on two different kinds of disk, and only one of them is meant to outlast a stop.

The rule

EBS survives a stop; instance store does not.

An EC2 instance can use two kinds of block storage.

Amazon EBS (Elastic Block Store) volumes are network-attached drives. Each volume is its own resource with its own lifetime:

  • Data survives stopping and starting the instance.
  • A volume can be detached and attached to another instance in the same Availability Zone.
  • Snapshots are point-in-time copies, stored durably by AWS and incremental after the first. From a snapshot you can build a new volume, even in another zone or Region.
  • Types include gp3 (general-purpose SSD, the usual default), io2 (provisioned-IOPS SSD for demanding databases), and st1 and sc1 (cheaper hard-disk types for large sequential data).
  • The root volume is deleted when the instance is terminated, by default. Extra volumes you attach are kept by default. Both are settings you can change.

Instance store is disk physically attached to the host machine. It is very fast and included in the price of the instance types that offer it, but it is ephemeral: data survives a reboot, and is lost when the instance stops, hibernates or terminates, or if the underlying disk fails.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.