Lesson 4 of 4 Amazon EBS and Instance Store

Choosing Between Instance Store and EBS

This lesson explains instance store, temporary block storage on disks attached to the host, which offers the highest I/O performance but loses its data when the instance stops.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish instance store from EBS.
  • Identify suitable uses of instance store.

Instance store or EBS?

Instance store and EBS both provide block storage to EC2 instances, but their durability is very different. Instance store volumes are NVMe disks physically attached to the host. They give very high IOPS and throughput and are included in the instance price, but their size is fixed by the instance type, they cannot be snapshotted, and their data survives only a reboot: it is lost when the instance stops, hibernates or terminates, or when the hardware fails. They suit temporary data, caches, buffers and data replicated across several instances.

EBS volumes are attached over the network and exist independently of the instance, so data persists through stops and can be moved to another instance. Their size and performance are chosen and can be changed, and they can be backed up with snapshots. They suit any data that must survive. The following table summarises the differences.

Instance store
AttachmentNVMe physically on the host
PerformanceVery high IOPS and throughput
CostIncluded in the instance price
PersistenceSurvives reboot; lost on stop, hibernate, terminate or hardware failure
SizeFixed by instance type
SnapshotsNot available
EBS
AttachmentNetwork-attached
PerformanceDepends on type
CostPer GB and performance
PersistenceIndependent of the instance
SizeChosen and changeable
SnapshotsAvailable

The following diagram shows where each kind of storage is attached.

Instance store compared with EBS. Instance store volumes are NVMe disks physically attached to the host, very fast and included in the price, but their data is lost when the instance stops, hibernates or terminates, or the hardware fails. EBS volumes are attached over the network and exist independently, so data survives a stop and the volume can be snapshotted and moved.
Because instance store is on the host, its data cannot follow the instance to new hardware when it stops.
Sort into groups

Instance store or EBS?

Exam skills 3.1.1 · 4.1.10

Decide which block storage each statement describes or suits.

Log in to try this activity Interactive activities are free with an account.

Suitable uses

Instance store volumes are physically attached to the host, which makes them very fast but temporary: their data is lost when the instance stops, terminates or its hardware fails. They therefore suit only data that can be lost, such as buffers, caches and scratch space, and temporary files used during processing jobs.

They also suit data that is replicated elsewhere, such as the nodes of a distributed database or a Hadoop cluster, where the loss of one node's copy is recovered from the others. Instance types with a d in their name, such as m6id, and storage-optimised families, such as I and D, include instance store volumes.

Worked example

The right storage for a database cluster

A Cassandra cluster of 12 nodes needs the highest possible disk performance. Cassandra replicates every row to three nodes across AZs.

OptionFit
io2 Block Express EBS volumesPersistent and fast, but expensive at this scale
Instance store on storage-optimised instancesHighest IOPS at no extra cost; data survives a node loss because Cassandra replicates it

Instance store suits the cluster because the application already replicates its data. Regular backups to S3 protect against losing the whole cluster.

Check yourself

Which workloads suit instance store?

Show answer

Temporary data, such as caches, buffers and scratch space, or data replicated across instances, because instance store is very fast but lost when the instance stops.

Exam Tips

Remember for the exam

  • For temporary data needing the highest IOPS, use instance store.
  • Instance store data is lost when the instance stops or its hardware fails, so never keep the only copy there.
  • Persistent data that must survive a stop belongs on EBS.