CloudGuild · Blog · Cheat sheets · Lessons · Certifications
EBS vs EFS vs Instance Store: When to Use What (and How the Exam Tests It)
Understand the differences between EBS, EFS, and Instance Store, and learn how AWS tests these concepts in the SAA-C03 exam.
Choosing the right storage option in AWS can significantly impact your architecture. Each storage solution has its strengths and ideal use cases. Let’s break down EBS, EFS, and Instance Store to clarify when to use each.
EBS: Elastic Block Store
EBS provides block-level storage that can be attached to a single EC2 instance. It is persistent storage, meaning the data remains intact even after the instance stops. Think of it as a hard drive for your EC2 instances. It's best suited for:
- Single-instance applications that require high IOPS
- Databases where persistent storage is critical
- Scenarios where you need a backup of your data
Types of EBS Volumes
- gp3: General-purpose SSD for a balance of price and performance.
- io1/io2: Provisioned IOPS SSD for applications that require consistent, high-performance storage.
- st1/sc1: Throughput-optimized and cold HDD options for less frequently accessed data.
EFS: Elastic File System
EFS is a managed file system that supports the NFS protocol. It allows multiple EC2 instances across different Availability Zones to access the same file system concurrently. This is ideal when:
- You need shared access for a fleet of Linux instances
- Applications require file storage that can scale automatically
- You want to take advantage of EFS's lifecycle management, which automatically moves cold files to infrequent access (IA) storage to save costs.
Instance Store: Temporary Storage
Instance store is physically attached to the host server of an EC2 instance. It is fast and provides high throughput, but it is ephemeral. If the instance stops or terminates, the data is lost. It's useful for:
- Temporary data that can be regenerated
- Caching and buffer storage where fast access is critical
- High-speed data processing where durability is not a concern
Comparison Table
| Feature | EBS | EFS | Instance Store |
|---|---|---|---|
| Type | Block storage | File storage | Block storage |
| Persistence | Yes | Yes | No |
| Shared Access | No (with narrow exceptions) | Yes | No |
| Performance | Varies (gp3, io1/io2) | Scales automatically | High throughput |
| Use Case | Single-instance apps | Shared file systems | Temporary data |
How the Exam Tests This
Understanding when to use EBS, EFS, or Instance Store is essential for the SAA-C03 exam. Here are some patterns to watch for:
- Scenario-based questions: These will present a situation where you must choose the appropriate storage solution based on the requirements provided.
- Misleading options: Expect distractors that may sound correct but do not fit the scenario, such as suggesting EBS for shared access when EFS is the right choice.
- Data durability traps: Be cautious of questions that imply data persistence with Instance Store, as this is a common mistake many candidates make.
Rule to Remember
Choose EBS for single-instance needs, EFS for shared access across instances, and Instance Store for temporary storage.
For more practice, Take the free SAA-C03 mock exam.