Skip to Content

EBS vs EFS vs instance store

The three storage options for EC2 side by side, with the rules that decide between them in exam questions.

The three options

EC2 instances can store data in three places. Exam questions often describe a need and ask which one fits.

EBS attaches to one instance in one AZ and survives stops; EFS is shared by hundreds of Linux instances across AZs; instance store belongs to its instance and loses data on stop EBS attaches to one instance in one AZ and survives stops; EFS is shared by hundreds of Linux instances across AZs; instance store belongs to its instance and loses data on stop

Who can use it, where it lives, and whether it lasts.

EBS volumes

  • Attached to one instance at a time (except io1/io2 with Multi-Attach).
  • Locked to one AZ. To move one to another AZ: take a snapshot, then restore it there.
  • Performance: gp2 IOPS grow with size; gp3, io1 and io2 raise IOPS independently.
  • Backups use I/O. Snapshots read the volume, so don't run them during heavy traffic.
  • Root volumes are deleted when the instance terminates, by default (this can be turned off).
  • Billed for provisioned size.

EFS

  • Mounted by hundreds of instances across AZs at once.
  • Linux only (POSIX).
  • Shares website files (WordPress), home directories, application data.
  • Higher price per GB than EBS, but billing is only for what's stored, and storage classes cut the cost of cold files.

Instance store

  • Physical disks inside the host, for the instance that runs there.
  • The highest IOPS and lowest latency.
  • Ephemeral: data is lost on stop, hibernate, terminate or hardware failure.
  • Included in the instance price.

Deciding in a question

  • Boot disk, database on EC2, data must survive stop/start, one server → EBS.
  • Several servers, possibly in different AZs, need the same files → EFS (Linux) or FSx (Windows and others).
  • Temporary data, cache, highest performance, data can be rebuilt → instance store.
  • Need the same data in another AZ → EBS snapshot and restore; or use EFS, which is already in every AZ.

Exam tips

  • "Shared across AZs" rules out EBS and instance store.
  • "Survives instance stop" rules out instance store.
  • "Lowest cost per GB for one server's disk" → EBS (gp3, or st1/sc1 for throughput data), not EFS.
  • "Millions of IOPS on one instance" → instance store.

Check yourself

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt