"To share files, copy them to every server." That works until the copies drift apart: one server gets the new upload, another still serves the old version, and a sync script quietly fails at 3 a.m. Amazon Elastic File System (EFS) removes the copies. Every server mounts the same folder, so there is only one version.
What EFS is
EFS is a shared file system that many compute resources mount at the same time over NFS (versions 4.0 and 4.1). Your application sees ordinary directories and files, with file locking and POSIX permissions.
It is serverless and elastic:
- No disk size to choose. It grows and shrinks automatically as you add and remove files, up to petabytes.
- You pay for the storage you use, plus throughput or data access charges depending on the options you pick.
- AWS runs the storage, patching and scaling for you.
Who can mount it
EFS is reachable from most AWS compute: EC2 instances, containers on ECS, EKS and Fargate, and AWS Lambda functions. That makes it a common answer for shared uploads, content management systems, home directories and shared configuration.
One important limit: EFS is built for Linux. Using it from Windows-based EC2 instances is not supported. For Windows file shares, look at Amazon FSx for Windows File Server instead.
Access is controlled at two layers: network rules (security groups on the mount targets) and IAM policies for NFS clients. Encryption at rest and in transit are both available.
Regional or One Zone
- Regional (recommended): data is stored redundantly across multiple Availability Zones in the Region, so it stays available if a zone has trouble.
- One Zone: data lives in a single Availability Zone. It costs less, but it is not resilient to the loss of that zone. AWS backs up One Zone file systems with AWS Backup by default.
Pick Regional for production data; One Zone suits dev environments or data you can recreate. See Regions and Availability Zones if the difference is new to you.
Storage classes, lifecycle and speed
EFS has three storage classes:
- Standard: SSD storage for active files, with the lowest latency.
- Infrequent Access (IA): cheaper storage for files read only a few times a quarter.
- Archive: the cheapest, for data read a few times a year or less (it requires Elastic throughput).
Lifecycle management moves files between classes automatically based on how long they go unread. Reading IA or Archive data has a per-access charge, so do not tier files your app reads every day.
For performance, AWS recommends the defaults: General Purpose mode and Elastic throughput, which scales up and down with your workload so you do not have to forecast it. Provisioned and Bursting throughput remain for predictable or storage-proportional workloads.
Where AI fits
Distributed training and batch inference often need the same dataset on many nodes. Put it on EFS once and every node, whether EC2 instances or pods on Amazon EKS, reads the same files: no copying, no drift, and new nodes start working as soon as they mount. For very high-throughput GPU training, compare it with FSx for Lustre, which is built for that job.
Quick recap
- EFS is one NFS file system that many Linux servers, containers and Lambda functions mount at once.
- It grows on its own; choose Regional for resilience or One Zone for lower cost.
- Lifecycle rules move cold files to Infrequent Access and Archive to cut the bill.