Amazon EFS
Shared folders (NFS)
A managed NFS file system that many EC2 instances/containers across multiple AZs can mount at once, growing automatically.
- Cost$$ Medium
- Difficulty●●●●●
- Costs money when idle?A little
- Serverless
- In examsSAA · SOA
Think of it asLike the office's shared network drive: everyone can open the same folder.
Where does EFS fit?
Calls EFS
A real example, step by step
- A WordPress site runs on 4 EC2 instances behind a load balancer; when someone uploads an image, all 4 must see it.
- You create an EFS file system in the VPC with a mount target in each AZ.
- All 4 instances mount EFS at wp-content/uploads; an image uploaded to one is visible on the others immediately.
- Capacity grows with the number of images, so you never choose a size in advance.
- Lifecycle management moves images not viewed for 30 days to the Infrequent Access class to cut storage costs.
When to use it
✓ Use it when
Multiple servers need to read/write shared files (CMS, user directories).
✗ Avoid it when
Only one server uses it and needs high IOPS → EBS; Windows servers → FSx.
Common uses
- Shared folders for multiple EC2 instances/containers (CMS, WordPress)
- Persistent storage for ECS/EKS containers and Lambda
- User home directories, shared ML data
EFS, EBS or S3?
What does it cost?
- Pricing model: Per GB-month actually used (Standard ~$0.30/GB; the Infrequent Access class is much cheaper) + read/write charges depending on throughput mode.
- Free tier: Negligible.
About 13× more expensive than S3 for rarely accessed data; forgetting to enable lifecycle; choosing Provisioned Throughput by mistake.
“Many Linux instances need one shared folder that stays in sync” → EFS. Windows machines need a shared folder → FSx for Windows File Server. Rarely touched data → lifecycle to EFS Infrequent Access.
Try real exam questions
1A company wants to move its on-premises network attached storage (NAS) to AWS. The company wants to make the data available to any Linux instances within its VPC and ensure changes are automatically synchronized across all instances accessing the data store. The majority of the data is accessed very rarely, and some files are accessed by multiple users at the same time. Which solution meets these requirements and is MOST cost-effective?
- ACreate an Amazon Elastic Block Store (Amazon EBS) snapshot containing the data. Share it with users within the VPC.
- BCreate an Amazon S3 bucket that has a lifecycle policy set to transition the data to S3 Standard-Infrequent Access (S3 Standard-IA) after the appropriate number of days.
- CCreate an Amazon Elastic File System (Amazon EFS) file system within the VPC. Set the throughput mode to Provisioned and to the required amount of IOPS to support concurrent usage.
- DCreate an Amazon Elastic File System (Amazon EFS) file system within the VPC. Set the lifecycle policy to transition the data to EFS Infrequent Access (EFS IA) after the appropriate number of days.
Show answer
Correct answer: D
EFS is a shared NFS folder for many Linux machines, and changes are visible on every machine at once. A lifecycle policy to EFS Infrequent Access makes it cheapest for rarely used files. Provisioned throughput only adds cost; S3 isn't a shared file system.
2A company is building a web application that serves a content management system. The content management system runs on Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances run in an Auto Scaling group across multiple Availability Zones. Users are constantly adding and updating files, blogs, and other website assets in the content management system. A solutions architect must implement a solution in which all the EC2 instances share up-to-date website content with the least possible lag time. Which solution meets these requirements?
- AUpdate the EC2 user data in the Auto Scaling group lifecycle policy to copy the website assets from the EC2 instance that was launched most recently. Configure the ALB to make changes to the website assets only in the newest EC2 instance.
- BCopy the website assets to an Amazon Elastic File System (Amazon EFS) file system. Configure each EC2 instance to mount the EFS file system locally. Configure the website hosting application to reference the website assets that are stored in the EFS file system.
- CCopy the website assets to an Amazon S3 bucket. Ensure that each EC2 instance downloads the website assets from the S3 bucket to the attached Amazon Elastic Block Store (Amazon EBS) volume. Run the S3 sync command once each hour to keep files up to date.
- DRestore an Amazon Elastic Block Store (Amazon EBS) snapshot with the website assets. Attach the EBS snapshot as a secondary EBS volume when a new EC2 instance is launched. Configure the website hosting application to reference the website assets that are stored in the secondary EBS volume.
Show answer
Correct answer: B
All EC2 instances mount the same EFS file system, so they see new content immediately. Hourly S3 syncs or EBS snapshots introduce lag and can drift out of date.
Frequently asked questions
Can Windows use EFS?
No. EFS uses the NFS protocol for Linux. For Windows machines that need a shared folder over SMB, use Amazon FSx for Windows File Server.
How is EFS priced?
By the amount of data actually stored each month, with nothing to provision in advance. Turn on lifecycle management to move rarely used files to the cheaper Infrequent Access or Archive classes automatically.
What do AWS exams ask about EFS?
Scenarios where several instances or containers must share the same folder, choosing between EFS, EBS and FSx, and using the infrequent-access storage classes to cut costs.