AWSDOP-C02
On this page
Beginner-friendly overview

EFS (Elastic File System)

Amazon EFS is a fully managed, shared file system for AWS. It gives you a standard NFS filesystem that many compute resources โ€” EC2 instances, ECS/EKS containers, and Lambda functions โ€” can mount and read/write at the same time. It grows and shrinks automatically, so there's no capacity to provision.

The Problem It Solves

Some workloads need many machines to share the same files โ€” a fleet of web servers serving the same content, a content-management system, a shared home directory, or containers that all read the same models or config. A regular disk (EBS) is attached to one instance in one Availability Zone, so it can't do this. Object storage (S3) can be shared, but it's an API, not a mountable filesystem โ€” your application can't open() a file on it like a normal path.

EFS fills that gap: a POSIX filesystem (real directories, permissions, file locking) that lives across multiple AZs and is reachable by everything in your VPC at once.

The Three Storage Choices

Picking between EBS, EFS, and S3 is a foundational AWS decision:

EBSEFSS3
TypeBlock device (a disk)Shared POSIX filesystemObject store (API)
Who can use itOne instance, one AZThousands, across AZsAnything, via API
Mount as a drive?Yes (one instance)Yes (many, concurrently)No
Typical cue"database volume""shared files across instances""objects, static assets, data lake"
One EFS filesystem, mounted read-write by many clients across AZs EC2 (AZ-a) mounts via NFS ECS / Fargate (AZ-b) task volume Lambda via access point Mount targets one ENI per AZ ยท port 2049 EFS filesystem regional ยท auto-scaling POSIX ยท KMS-encrypted

How You Reach It

EFS lives in your VPC. In each Availability Zone you create a mount target โ€” a network interface with an IP โ€” and clients in that AZ mount the filesystem through their local target (so traffic stays in-AZ, which is fast and avoids cross-AZ charges). A security group on the mount target controls who can connect (NFS uses port 2049).

EFS is a shared drive for the cloud. EBS is the disk inside one computer; S3 is a warehouse you talk to by API; EFS is the shared network drive the whole team mounts at once. Whenever a scenario says "multiple instances / containers / Lambdas need the same writable files," that's EFS โ€” and for Fargate or EKS ReadWriteMany volumes, it's often the only option.