EBS, EFS, FSx and Instance Store: Choosing Block, File and High-Performance Storage on AWS
Block, File and Object Storage
| Type | How you use it | AWS service |
|---|---|---|
| Block | A raw disk attached to one server. You format it with a file system | EBS, instance store |
| File | A shared folder many servers mount over the network (NFS/SMB) | EFS, FSx |
| Object | Files accessed by API over HTTPS | S3 |
Amazon EBS: Elastic Block Store
- Network-attached disks for EC2. Persist independently from the instance
- A volume lives in one AZ, attaches to an instance in the same AZ
- Usually one volume to one instance (Multi-Attach on io1/io2 allows several Nitro instances in the same AZ)
- An instance can have many volumes. Root volume is deleted on termination by default (
DeleteOnTermination) - Elastic Volumes: change size, type, IOPS while attached, no downtime
EBS Volume Types
| Type | Medium | Performance | Use for |
|---|---|---|---|
| gp3 | SSD general purpose | 3,000 IOPS and 125 MB/s baseline, up to 16,000 IOPS and 1,000 MB/s, set independently of size | Default choice: boot volumes, apps, dev/test, most databases |
| gp2 | SSD general purpose (older) | IOPS tied to size (3 per GB), bursts | Legacy. Migrate to gp3 for lower cost |
| io2 / io2 Block Express | SSD provisioned IOPS | Up to 64,000 (io2) and 256,000 IOPS (Block Express), 99.999 percent durability, sub-millisecond latency | Critical databases (Oracle, SQL Server), I/O-heavy |
| io1 | SSD provisioned IOPS (older) | Up to 64,000 IOPS | Legacy, io2 is better |
| st1 | HDD throughput optimized | Up to 500 MB/s, low cost per GB, cannot be a boot volume | Big sequential reads: logs, data warehouses, Kafka |
| sc1 | HDD cold | Up to 250 MB/s, lowest cost, not bootable | Infrequently accessed large data |
Exam tip: Need the most IOPS → io2. Cheap big sequential throughput → st1. Cheapest cold → sc1. Default → gp3. Only SSD volumes can be boot volumes.
bash
aws ec2 create-volume --availability-zone ap-south-1a --size 100 --volume-type gp3 --iops 6000 --throughput 250 --encrypted --kms-key-id alias/app-data \
--tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=data-1}]'
aws ec2 attach-volume --volume-id vol-0abc --instance-id i-0abc --device /dev/sdf
# on the instance:
sudo mkfs -t xfs /dev/nvme1n1 && sudo mkdir /data && sudo mount /dev/nvme1n1 /data
aws ec2 modify-volume --volume-id vol-0abc --size 200 --volume-type gp3 --iops 8000 # resize online, then grow the file system
sudo xfs_growfs -d /data
Snapshots
- Incremental backups stored in S3 (managed by AWS). The first is full, later ones store changes
- Deleting an old snapshot is safe: needed blocks are kept for newer snapshots
- Restore to a new volume, in any AZ of the Region. Copy snapshots to another Region or account for DR
- Fast Snapshot Restore (FSR) removes the first-read latency when creating volumes (extra cost)
- Recycle Bin retains deleted snapshots and AMIs for a period
- Amazon Data Lifecycle Manager (DLM) or AWS Backup automate snapshots and retention
- Snapshot Archive tier lowers cost for rarely used snapshots
bash
aws ec2 create-snapshot --volume-id vol-0abc --description "pre-upgrade" --tag-specifications 'ResourceType=snapshot,Tags=[{Key=Name,Value=pre-upgrade}]'
aws ec2 copy-snapshot --source-region ap-south-1 --source-snapshot-id snap-0abc --region eu-west-1 --encrypted --kms-key-id alias/dr-key
aws ec2 create-volume --snapshot-id snap-0abc --availability-zone ap-south-1b --volume-type gp3
Instance Store
- Disk physically on the host. Very high IOPS and low latency (NVMe)
- Ephemeral: data is lost on stop, terminate or host failure (survives reboot)
- Use for caches, buffers, scratch space, or data replicated elsewhere (for example Cassandra, Kafka with replicas)
- Cannot be snapshotted. Included in the instance price
Amazon EFS: Elastic File System
EFS is a managed NFS (v4) file system that grows and shrinks automatically. It is Regional: many instances in different AZs can mount it at the same time. Linux only (not Windows).
| Feature | Details |
|---|---|
| Throughput modes | Elastic (default, scales automatically), Provisioned, Bursting |
| Performance modes | General Purpose (default, low latency), Max I/O (older, higher scale) |
| Storage classes | Standard (multi-AZ), Standard-IA, Archive, and One Zone variants (single AZ, cheaper). Lifecycle management moves files that were not read for N days |
| Security | Security groups on mount targets, IAM authorization, POSIX permissions, encryption at rest (KMS) and in transit (TLS) |
| Backups | AWS Backup, replication to another Region |
bash
aws efs create-file-system --encrypted --throughput-mode elastic --tags Key=Name,Value=shared-content
aws efs create-mount-target --file-system-id fs-0abc --subnet-id subnet-priv-a --security-groups sg-efs # one per AZ
sudo dnf install -y amazon-efs-utils
sudo mkdir /mnt/shared && sudo mount -t efs -o tls fs-0abc:/ /mnt/shared
Amazon FSx
| Service | What it is | Use for |
|---|---|---|
| FSx for Windows File Server | Managed SMB file shares with Active Directory integration, NTFS, DFS | Windows apps, home directories, SQL Server |
| FSx for Lustre | High-performance parallel file system, can link to S3 | HPC, machine learning training, media processing |
| FSx for NetApp ONTAP | NetApp features: NFS, SMB, iSCSI, snapshots, dedupe, multi-protocol | Migrating NetApp workloads, mixed Windows/Linux |
| FSx for OpenZFS | ZFS file system, NFS, low latency, snapshots and clones | Migrating ZFS workloads, Linux data sharing |
Choosing Storage
| Requirement | Choice |
|---|---|
| Boot disk or database disk for one EC2 instance | EBS gp3 (io2 for extreme IOPS) |
| Highest IOPS, sub-millisecond, critical DB | EBS io2 Block Express |
| Large sequential throughput on a budget | EBS st1 |
| Shared Linux file system across AZs | EFS |
| Windows file shares with AD | FSx for Windows |
| HPC / ML scratch with S3 integration | FSx for Lustre |
| Temporary very fast local data | Instance store |
| Unlimited objects, web, backups, data lake | S3 |
| Hybrid on-premises file access to cloud | Storage Gateway (next lesson) or FSx File Gateway |
Common Mistakes
- Putting data on instance store and expecting it to persist
- Forgetting a volume is one AZ only: for DR copy snapshots to another AZ or Region
- Leaving unattached volumes and old snapshots that keep costing money
- Using gp2 for big volumes when gp3 is cheaper and faster
- Not growing the file system after resizing the volume
Practice Tasks
- Create a gp3 volume, attach, format and mount it, then resize it online
- Take a snapshot, delete the volume, restore the snapshot in a different AZ
- Mount one EFS file system on two EC2 instances in different AZs and see shared files
- Add an EFS lifecycle policy to move files to IA after 30 days
- Write down for five workloads which storage service you would use and why
Conclusion
EBS is block storage in one AZ (gp3 default, io2 for top IOPS, st1/sc1 for HDD throughput), snapshots give incremental backups across AZs and Regions, EFS is a shared multi-AZ Linux file system, FSx covers Windows, Lustre, ONTAP and OpenZFS, and instance store is fast but ephemeral.
Quick Summary: block/file/object; EBS types; create/attach/resize CLI; snapshots + FSR + DLM; instance store; EFS modes/classes/mount; FSx four types; decision table; mistakes.

