Amazon EFS (Elastic File System) is a fully managed, scalable file storage service designed for Linux-based workloads, offering automatic scaling, concurrent access by multiple EC2 instances, and file-level locking. It functions as a cloud-based file server that automatically grows and shrinks, providing read-after-write consistency and high durability by storing data across multiple Availability Zones. (source_page: 1, 2, 4, 5)
Amazon EFS provides scalable, elastic file storage, acting as a shared file system for Linux-based workloads across various AWS compute services and on-premises environments.
EFS is a fully managed, scalable file storage service for use with Amazon EC2 and other AWS compute services. It functions as a cloud-based file server that automatically grows and shrinks.
EC2 instances connect to EFS via a mount target or mount point, which acts as the entry point to the file system. Mounting is analogous to mounting a USB drive on a laptop. EFS supports concurrent mounting by one to thousands of EC2 instances across multiple Availability Zones, regions, VPCs, and on-premises servers. Cross-VPC access within a region is possible via VPC peering, and on-premises access is achievable through VPN or AWS Direct Connect.
EFS is designed for Linux-based operating systems only. Windows operating systems are not supported.
EFS scales automatically, growing and shrinking storage capacity without manual intervention or downtime, up to petabytes of storage. It can be accessed from multiple EC2 instances spread across Availability Zones (AZs) and supports multiple compute instances (EC2, ECS, Lambda) running in different AZs within the same VPC. EFS file systems are regional, meaning data is accessible from any AZ within the region. AWS recommends creating a mount target in each AZ where EC2 instances reside to reduce latency and improve high availability.
Technical Specs: Scales automatically up to petabytes of storage
EFS supports the Network File System (NFS) V4 protocol. It is a fully POSIX-compliant file system with strong read-after-write consistency and file locking capabilities, enabling safe concurrent read/write operations. EFS is regionally resilient by default, storing data across multiple AZs for high availability.
Technical Specs: Protocol Support: Network File System (NFS) V4
EFS supports encryption at rest using AWS Key Management Service (KMS). Encryption can only be enabled when creating a new EFS file system. To encrypt an existing unencrypted EFS, a new encrypted EFS must be created, and the data copied over.
EFS is suitable for Content Management Systems (e.g., WordPress), web applications running on multiple EC2 instances, data science environments requiring shared datasets, media processing pipelines, and legacy applications during lift-and-shift migrations needing shared file systems.
EFS offers different file system types and configurable performance and throughput modes to optimize for specific workload requirements, balancing availability, durability, latency, and cost.
Performance is measured by Latency, Throughput, and Input/Output Operations Per Second (IOPS).
Regional File System Type
This file system type provides the highest availability and durability by storing data redundantly across multiple Availability Zones.
Use Cases:
- Workloads requiring maximum resilience and durability
One Zone File System Type
In contrast to Regional, data for a One Zone file system is stored redundantly within a single Availability Zone. This offers cost savings for workloads that do not require multi-AZ resilience.
Use Cases:
- Workloads not requiring multi-AZ resilience
- Cost savings
General Purpose Performance Mode
This is the default performance mode, suitable for approximately 99% of client needs. It is ideal for latency-sensitive use cases.
Use Cases:
- Web applications
- Web servers
- Content Management Systems (CMS)
- Latency-sensitive use cases
Max I/O Performance Mode
Optimized for applications where tens to thousands of EC2 instances access EFS concurrently. It scales to higher aggregated throughput and is designed for highly parallel workloads that can tolerate higher latency.
Use Cases:
- Big data applications
- Media processing
Elastic Throughput Mode
This mode automatically scales throughput performance up or down based on demand. Users pay only for the data read/written, and there is no burst credit accumulation. It is recommended for spiky or unpredictable workloads.
Use Cases:
- Spiky or unpredictable workloads
Provisioned Throughput Mode
Allows users to specify a fixed throughput level, independent of the file system size or burst credits. This mode is used when workload performance requirements are known, and users are charged for the throughput provisioned.
Use Cases:
- Workloads with known and consistent performance requirements
Bursting Throughput Mode
Throughput scales with the amount of data stored. It provides a baseline performance of 50 MB/s per TB of storage, with an additional burstable limit of 100 MB/s per TB of storage.
baseline_performance:
50 MB/s per TB of storage
burstable_limit:
additional 100 MB/s per TB of storage
EFS offers various storage classes tailored for different access patterns and cost efficiencies, complemented by lifecycle policies to automate data tiering.
EFS supports different storage classes and lifecycle management to optimize costs and performance.
Standard Storage Class
This class uses SSD-based storage for the lowest latency. It is best suited for frequently accessed data and incurs no retrieval fees.
first_byte_latency:
Sub-millisecond
storage_type:
SSD-based
Infrequent Access (IA) Storage Class
A cost-optimized class for less frequently accessed data (e.g., accessed a few times per quarter). It charges retrieval fees for reading/writing and has a latency in the tens of milliseconds. Storing frequently accessed files here can increase overall costs due to retrieval fees.
latency:
Tens of milliseconds
Use Cases:
- Less frequently accessed data
Archive Storage Class
Ideal for inactive data or data accessed very rarely (e.g., a few times per year). Like IA, it charges retrieval fees for reading/writing and has a latency in the tens of milliseconds. It has a minimum storage duration of 90 days.
latency:
Tens of milliseconds
minimum_storage_duration:
90 days
Use Cases:
- Inactive data
- Rarely accessed data
Lifecycle Policies
AWS EFS can automatically transition files between Standard, Infrequent Access, and Archive tiers based on access patterns. These policies can automatically move less-accessed files to IA to save costs. Additionally, policies can move files back to Standard when accessed, avoiding repeated retrieval charges.
Use Cases:
- Automating data tiering for cost savings
- Optimizing data access based on frequency
EFS is a unique shared file system service that differs significantly from block storage (EBS) and object storage (S3).
Amazon S3 is an object storage service with a REST API; it lacks file system semantics, file locking, and direct mounting like a traditional file system. S3 uses eventual consistency for some operations. EFS is more expensive than S3 for storing and sharing independent documents, as it is designed specifically for concurrent EC2 instance access via file system protocols.
Amazon EBS provides block storage, typically attachable to a single EC2 instance (with exceptions for multi-attach on Nitro instances) and requires manual scaling. EFS, in contrast, is a shared file system accessible by multiple EC2 instances. Documents stored on separate EBS volumes tied to individual EC2 instances can lead to inconsistent views, a problem resolved by migrating to Amazon EFS to provide shared, consistent storage accessible by all instances.
The AWS Console provides a guided workflow for creating and deleting EFS file systems, allowing configuration of various settings.
Step-by-step process for creating and deleting an EFS file system in the AWS Console.
Prerequisites
- An AWS Account
- Appropriate IAM permissions for EFS creation and management
- An existing VPC (or use the default VPC)
1
Navigate to the EFS Console
💡 The entry point for EFS service management.
2
Initiate file system creation
💡 Starts the guided wizard for configuring a new EFS file system.
3
Assign a name and select a VPC
💡 Provides a descriptive identifier for the EFS and links it to a specific network environment. EFS is a VPC service.
4
Review or customize recommended settings
💡 Defaults often include Elastic Throughput, automatic transitions to Infrequent Access (e.g., after 30 days) and Archive (e.g., after 90 days), automatic backup, and encryption. Customization allows tailoring to specific needs.
5
Configure file system type, backup, encryption, performance, and throughput modes
💡 These options determine resilience (Regional/One Zone), data protection, and how the file system scales and performs.
6
Configure mount targets and security groups
💡 Mount targets provide network entry points for instances, and a default security group is created to control network access.
7
Attach file system policies (optional)
💡 Allows for fine-grained access control to the EFS file system.
8
Delete an EFS file system
💡 To stop incurring charges for the EFS file system when it is no longer needed.
9
Confirm deletion by typing the file system ID
💡 A mandatory step to prevent accidental deletion of critical data.
Glossary
Amazon EFS (Elastic File System)
A fully managed, scalable file storage service for use with Amazon EC2 and other AWS compute services, functioning as a cloud-based file server.
Mount Target / Mount Point
An entry point to an EFS file system that EC2 instances connect to.
NFS V4
Network File System version 4, the protocol supported by Amazon EFS.
POSIX compliant
Compliance with Portable Operating System Interface standards, ensuring compatibility with Linux operating systems.
Read-after-write consistency
A strong consistency model provided by EFS where any read request made after a write request will return the most recent data.
One Zone File System
An EFS file system type where data is stored redundantly within a single Availability Zone, offering cost savings but less resilience than Regional.
Elastic Throughput
An EFS throughput mode that automatically scales throughput performance up or down, billing only for data read/written, and without burst credit accumulation.