EBS vs Instance Store
Understand the differences between persistent (EBS) and temporary (Instance Store) block storage for EC2.
All services used in this lesson are covered by the AWS Free Tier.
AWS Services Used
Learning outcomes
By the end of this lesson, you will be able to:
- Explain the difference between Amazon EBS and instance store.
- Describe which option is persistent and which is temporary.
- Choose the right storage type for a given scenario.
- Explain why EBS is usually the safer default for important EC2 data.
- Understand where EBS snapshots fit into the picture.
How EC2 storage works
EBS is the persistent disk option for EC2. Instance store is the temporary disk option.
A simple memory rule:
- EBS = keep it (Durable)
- Instance Store = lose it when the instance lifecycle ends (Ephemeral)
1) What is Amazon EBS?
Amazon EBS (Elastic Block Store) provides high-performance block storage for EC2. You attach EBS volumes to an instance and use them just like a physical hard drive on a normal computer.
- Persistence: An EBS volume survives even if you stop or terminate the instance.
- Flexibility: You can increase its size or performance without restarting the server.
- Backups: You can take Snapshots (point-in-time backups) and restore them to new volumes later.
2) What is Instance Store?
Instance store provides temporary block-level storage. Unlike EBS, which is a separate service, instance store comes from disks physically attached to the host computer that runs your EC2 instance.
- Ephemeral: Data on an instance store volume lasts only during the life of the instance.
- Loss Risk: If you stop, hibernate, or terminate the instance, all data on the instance store is lost.
- Performance: Because the disks are physically attached, they offer very high speed and low latency.
Warning
The Termination Rule: If your instance stops or fails, your Instance Store data is gone. Never use Instance Store for the only copy of important data.
3) Side-by-Side Comparison
| Feature | Amazon EBS | Instance Store |
|---|---|---|
| Type | Durable network storage | Temporary local storage |
| Persistence | Persists after stopping/restarting | Lost after stopping/restarting |
| Backups | Supports Snapshots | No native snapshot feature |
| Pricing | Billed by GB-month | Included in instance price |
| Best For | Databases, OS disks, important files | Caches, scratch space, temp files |
4) When to use which?
Use EBS when:
- You are setting up a Root Disk (where the OS lives).
- You have a Database that needs to keep its records safe.
- You want to be able to Snapshot and restore your data.
- You need your data to survive if you stop the instance to save money.
Use Instance Store when:
- You need a fast Cache for temporary data.
- You are using a Distributed Cluster where data is replicated across many nodes.
- You have "scratch space" for video editing or data processing that can be easily recreated.
Micro-activity 1: Choose the Right Storage
Storage Decisions
Match the use case to the most appropriate storage type.
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 5 matched so far.
Micro-activity 2: Persistence Rules
Lifecycle Check
What happens to the data in these situations?
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 4 matched so far.
Summary
Amazon EC2 offers different storage options based on your needs. EBS is your durable, reliable friend for important data and OS disks. Instance Store is a specialized tool for high-speed, temporary tasks where you don't care if the data disappears.
Knowledge Check
Next lesson
Lesson 4.5: Elastic Load Balancing (ELB) Basics