EBS, EFS, and FSx
Learn the differences between block storage (EBS) and file storage (EFS, FSx) and when to use each.
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 block storage and file storage.
- Explain what EBS, EFS, and FSx each do.
- Choose the right service for a given scenario.
- Recognize that EFS is shared file storage, while EBS is usually attached to one EC2 instance at a time.
- Identify the main FSx family options at a high level.
How these storage types differ
A simple way to separate these services is:
- EBS = Disk for a single server.
- EFS = Shared Linux file system for multiple servers.
- FSx = Managed file systems for specialized needs (Windows, Lustre, etc.).
A simple memory rule:
- EBS is "attached storage" (like a USB drive).
- EFS is "shared file storage" (like a network folder).
- FSx is "specialized managed file system."
1) What is Amazon EBS?
Amazon EBS (Elastic Block Store) provides block storage for EC2. After you attach an EBS volume to an instance, you use it like a local hard drive.
- Behavior: It acts as a raw, unformatted block device.
- Connection: Usually attached to one instance at a time (within the same Availability Zone).
- Snapshots: You can take point-in-time backups that persist even if the volume is deleted.
2) What is Amazon EFS?
Amazon EFS (Elastic File System) is a serverless, fully elastic file system. It is designed to be shared across many compute resources simultaneously.
- Behavior: A managed network file system (NFS).
- Connection: Can be mounted by thousands of EC2 instances, Lambda functions, or containers at once.
- Elasticity: It grows and shrinks automatically as you add or remove files. You don't have to provision size in advance.
3) EBS vs. EFS: The Main Difference
| Feature | Amazon EBS | Amazon EFS |
|---|---|---|
| Storage Type | Block Storage | File Storage |
| Scale | Must provision size (e.g. 100GB) | Fully Elastic (pay for what you use) |
| Accessibility | Single instance (Single AZ) | Multiple instances (Multi-AZ) |
| Usage | Boot volumes, databases | Shared media, home directories |
4) What is Amazon FSx?
Amazon FSx is a family of services that makes it easy to run popular commercial and open-source file systems in the cloud.
If EFS is the "simple AWS-native" file system, FSx is the "bring your own favorite technology" file system.
Common FSx Variants:
- FSx for Windows File Server: Fully managed Windows file servers using the SMB protocol. Perfect for corporate environments.
- FSx for Lustre: Built for high-performance computing (HPC) and machine learning. It's incredibly fast for processing massive datasets.
- FSx for NetApp ONTAP: Enterprise-grade shared storage with advanced data management features.
- FSx for OpenZFS: Managed file storage built on the OpenZFS file system.
Micro-activity 1: Pick the Right Storage
Storage Service Selection
Which service is the best fit for these requirements?
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 5 matched so far.
Micro-activity 2: Block vs. File
Storage Paradigms
Match the characteristic to the storage type.
Examples
Choose one, then match it on the right
Characteristics
Select an example first
0 of 4 matched so far.
Summary
Amazon offers a storage service for every need. Use EBS for your server's primary disk. Use EFS for a simple, shared Linux-style file system. Turn to FSx when you need a specific technology like Windows File Server or the extreme performance of Lustre.