Storage

Table of Contents
EBS Volume #
- EBS (Elastic Block Store) - Network drive that can be attached to instances while they run
- It allows instances to persist the data, even after their termination
- Can be mounted to 1 instance at a time
- Bound to an Availability Zone
- It’s a “Network Drive”
- it uses the network to communicate to the instance (there can be latency)
- it can be detached from an EC2 instance and attached to another one quickly
- It’s locked to an Availability Zone (AZ)
- an EBS Volume that is us-east-1a can’t be attached to us-east-1b
- to move a volume across AZ, snapshot has to be created first
- It has a provisioned capacity (size in GB and IOPS)
- you will get billed for a provisioned capacity
- You can increase the capacity of the drive
EBS Delete on Termination #
- Controls the EBS behavior when EC2 instance terminates
- by default the root EBS volume is deleted (attribute enabled)
- by default any other attached EBS volume is not deleted (attribute disabled)
- This can be controlled by both, AWS Console and AWS CLI
- Use case: preserve root volume when instance is terminated
EBS Snapshots #
- Make a backup (snapshot) of EBS volume at a point in time
- Not necessary to detach the volume to do the snapshot but recommended
- Snapshots can be copied across AZ or Regions
EBS Snapshots features #
- EBS Snapshot Archive
- Move a Snapshot to an “archive tier” that is 75% cheaper
- Takes between 24 to 72 hours of restoring the archive
EC2 > Snapshots > Recycle Bin > Create retention rule
When Snapshot Archive is enabled, it is possible to Archive it from a drop-down box in AWS Console. Archived Snapshot appears in the Recycle Bin
- Recycle Bin for EBS Snapshots
- Setup rules to retain deleted snapshots so you can recover them after an accidental deletion
- Specify retention (from 1 day to 1 year)
EC2 Instance Store #
EBS volumes are network drives with good but “limited” performance
If high-performance hardware disk is required, EC2 Instance Store can be used
Better I/O performance
EC2 Instance Store is ephemeral (data is lost after stopping EC2 instance)
Use case: buffer, cache, scratch data, temporary content
Risk of data loss if hardware fails.
EFS - Elastic File System #
- Managed NFS (Network File System) that can be mounted on 100s of EC2 instances
- EFS works with Linux EC2 instances only and is multi-AZ.
- Highly-available, scalable, expensive (3x gp2 EBS), pay per use, no capacity planning
EFS Infrequent Access (EFS-IA) #
- Storage class that is cost-optimized for files not accessed every day
- up to 92% lower cost compared to EFS Standard
- When enabled, EFS will automatically move your files to EFS-IA based on last time they were accessed
- Enable EFS-IA with a Lifecycle Policy
- Example: move files that are not accessed for 60 days to EFS-IA
- Transparent to the applications accessing EFS (apps don’t see whether file is in EFS or EFS-IA)
EBS vs EFS #
Feature | EBS | EFS |
---|---|---|
Access Model | Single-instance | Multi-instance |
Use Cases | Databases, Development | Web serving, big data |
Performance | Low-latency, high IOPS | High throughput |
Scalability | Limited to provisioned volume | Auto-scales to petabytes |
File Size Limit | No limit | 47.9 TiB |
Accessibility | Not accessible over the internet | Shared across instances |
Pricing | Cheaper for single-instance | Cost-effective for shared use |
More: |
- https://aws.amazon.com/efs/when-to-choose-efs/
- https://lucidity.cloud/blog/ebs-vs-efs
- https://www.cloudzero.com/blog/ebs-vs-efs/
Amazon FSx #
3rd party with high-performance file system on AWS.
- FSx for Lustre - fully managed, high-performance, scalable file storage for High Performance Computing (HPC).
- Use cases: Machine Learning, Analytics, Video processing, Financial Modelling
- Scales up to 100s GB/s, millions of IOPS, sub-ms latencies
- FSx for Windows File Server - fully managed, highly reliable and scalable Windows native shared file system built on Windows File Server. Supports SMB and NTFS file systems. Integrated with AD for security. Can be accessed from AWS or from On-Premise.
- FSx for NetApp ONTAP -
Summary #
EBS Volumes
- network drives attached to one EC2 instance at a time
- Mapped to an Availability Zones
- Can use EBS snapshots for backups and then transferring across AZ’s
EC2 Instance Store
- high performance hardware disk attached to our EC2 instance
- ephemeral (data lost if instance stopped or terminated)
EFS
- Network File System
- Can be attached to 100s of EC2 instances
- spans through a region
- expensive compared to EBS
EFS-IA
- Cost-optimized storage class for infrequently accessed files
- Lifecycle Policy for automatically moving files between tiers
FSx for Windows
- Network File System for Windows servers
- SMB and NTFS
- Can be accessed from on-prem and the cloud
FSx for Lustre
- High Performance (HPC) Linux file system
» Sources « #
- https://aws.amazon.com/efs/when-to-choose-efs/
- https://lucidity.cloud/blog/ebs-vs-efs
- https://www.cloudzero.com/blog/ebs-vs-efs/
» References « #
» Table of contents (CLF-C02) « #
» Disclaimer « #
Disclaimer: Content for educational purposes only, no rights reserved.
Most of the content in this series is coming from Stephane Maarek’s Ultimate AWS Certified Cloud Practitioner CLF-C02 2025 course on Udemy.
I highly encourage you to take the Stephane’s courses as they are awesome and really help understanding the subject.
More about Stephane Maarek:
This article is just a summary and has been published to help me learning and passing the practitioner exam.