AWS › EC2 & Compute

What is the difference between EBS backed and instance store backed EC2 instances in terms of data persistence?

Intermediate

Answer

An EBS backed instance stores its root volume on Amazon Elastic Block Store, meaning the data persists independently of the instance's lifecycle and survives a stop and start cycle, while an instance store backed instance uses temporary storage physically attached to the underlying host, meaning any data stored there is permanently lost if the instance is stopped or terminated, making EBS backed instances the appropriate choice for the vast majority of workloads requiring persistent data.
aws ec2 describe-volumes --filters Name=attachment.instance-id,Values=i-1234567890abcdef0
Real-world example A database server relies on an EBS backed instance to ensure its data remains intact even if the instance needs to be stopped for a maintenance window, whereas a purely temporary caching layer uses instance store volumes since losing that data on restart is acceptable.

Common follow-ups: What happens to data on an instance store volume if the instance is simply rebooted rather than stopped?;When would instance store volumes actually be the better choice despite their lack of persistence?