Amazon Elastic File System (EFS) is a serverless, fully managed, elastic file system that lets you share file data without provisioning or managing storage. It can be used with AWS Cloud services and on-premises resources, and is built to scale on demand to petabytes without disrupting applications.
Unlike EBS (which is like a local hard drive for one server), EFS is a Network File System (NFS). This means hundreds or thousands of EC2 instances, Lambda functions, and Containers can access the same files at the same time.

How Does EFS Work?
EFS can be created using the EC2-Instance where it will be created in a specific region and distributed across multiple availability zones for the purpose of high availability and durability. You can choose the EFS based on the I/Ops you are going to perform.
- File System: The top-level resource.
- Mount Targets: To access EFS, you create "Mount Targets" in your VPC subnets. These provide an IP address for your resources to connect to.
- NFS Protocol: Your EC2 instances use the standard NFSv4 protocol to mount the file system, making it look like a standard local directory (e.g.,
/mnt/efs). - Regional Availability: Data written to EFS is automatically replicated across multiple Availability Zones (AZs) in a Region (unless you choose One Zone storage). This makes it highly durable.
Use Cases Of EFS
- Secured file sharing: You can share your files in every secured manner and in a faster and easier way and also ensures consistency across the system.
- Web Hosting: Well suited for web servers where multiple web servers can access the file system and can store the data EFS also scales whenever the data incoming is increased.
- Modernize application development: You can share the data from the AWS resources like ECS, EKS, and any serverless web applications in an efficient manner and without more management required.
- Machine Learning and AI Workloads: EFS is well suited for large data AI applications where multiple instances and containers will access the same data improving collaboration and reducing data duplication.
Above are some of the use cases of AWS EFS widely used for handling larger datasets type applications.
Performance & Throughput Modes
Configuring performance correctly is the most important part of setting up EFS.
1. Performance Modes
- General Purpose: The default. Low latency. Best for web serving, CMS, and general file sharing.
- Max I/O: Higher latency, but massive throughput. Best for Big Data analytics and media processing with hundreds of parallel threads.
2. Throughput Modes
- Elastic (Recommended): The modern default. Throughput scales automatically with your workload. You pay for what you use. No guessing required.
- Bursting: Throughput is tied to your storage size. You earn "burst credits" when idle and spend them when active. Good for small, spiky workloads.
- Provisioned: You pay for a fixed amount of throughput (MB/s) regardless of your storage size. Useful if you have a tiny dataset that needs massive speed.
Comparison: EFS vs. EBS vs. S3
This table clarifies when to use which service.
| Feature | Amazon EFS | Amazon EBS | Amazon S3 |
|---|---|---|---|
| Type | File Storage (NFS) | Block Storage (Hard Drive) | Object Storage (API) |
| Access | Multi-Attach (Thousands of instances) | Single-Attach (One instance at a time*) | API Access (Anywhere via HTTP) |
| Latency | Low (ms) | Lowest (sub-ms) | Variable (ms) |
| OS Boot | No | Yes (Boot Volumes) | No |
| Storage Limit | Elastic (Petabytes) | Provisioned (up to 64TB) | Unlimited |
| Pricing | Expensive ($0.30/GB) | Moderate ($0.10/GB) | Cheap ($0.023/GB) |
Storage Classes & Lifecycle Management
EFS offers four storage classes to optimize costs. You typically don't select these manually; you use Lifecycle Management to move files automatically.
- EFS Standard: SSD-backed. High performance for active data.
- EFS Standard-IA (Infrequent Access): Lower cost storage for files not accessed every day. First byte latency is slightly higher.
- EFS One Zone: Stores data in only one AZ. ~47% cheaper, but if that AZ fails, data is unavailable.
- EFS One Zone-IA: The cheapest option. One AZ, infrequent access.
Lifecycle Policy: You can set a rule: "Move files that haven't been accessed in 30 days to Infrequent Access." This creates massive cost savings without changing how your application accesses files.

Different Performance Modes in EFS
General-purpose
- Offers low latency.
- Supports a maximum of 7000 IOPS.
- As a cloud watch metric, you can view the amount of IOPS your architecture uses and can switch to Max IOPS if required.
Max I/O
- This is recommended when EFS needs over 7000 IOPS
- Theoretically, this mode has an unlimited I/O speed.

Different Throughput Modes in EFS
- Burst Mode: Allows 100MBPS of burst speed per TB of storage.
- Provisioned Mode: Users can decide the max burst speed of the EFS but are charged more when speeds go beyond the default limit.

Steps To Configure and Connect To EFS(Elastic File Storage)
First, create an AWS account create refer to Amazon Web Services – Setting Up an AWS Account.
Step 1: Create an EFS from the AWS console. Choose the correct VPC (Virtual Private Cloud) and configuration that suits your use case.
.webp)
Step 2: Create one or more EC2 servers from the EC2 dashboard as needed for your use case.

Step 3: Allow the EC2 security group to access EFS. Connect To EFS from your EC2 servers. Primarily there are 2 methods of connecting to EFS from EC2 servers: Linux NFS Client: This is the old traditional method of connecting to file systems.EFS Mount Helper: This is the AWS-recommended and simpler solution to connect to EFS.
-(1).webp)
.webp)
- Once you have connected to AWS EFS from your EC2 instances you will have a folder of any name (say EFS-Folder) which will hold all the files in the EFS. Any file created in this directory can be seen or edited from any EC2 instances that have access to the EFS.

The above image shows an Elastic File System shared between two instances which are further connected to their own EBS volumes. The following are some use cases of EFS:
- Multiple server architectures: In AWS only EFS provides a shared file system. So all the applications that require multiple servers to share one single file system have to use EFS.
- Big Data Analytics: Virtually infinite capacity and extremely high throughput make EFS highly suitable for storing files for Big data analysis.
- Reliable data file storage: EBS data is stored redundantly in a single Availability Zone however EFS data is stored redundantly in multiple Availability Zones. Making it more robust and reliable than EBS.
- Media Processing: High capacity and high throughput make EFS highly favorable for processing big media files.
Security Best Practices
- Security Groups: EFS has its own Security Group. You must allow Inbound NFS (Port 2049) from the Security Group of your EC2 instances/Lambda.
- IAM Authorization: Don't rely just on network security. Use IAM policies to control which clients can mount the file system (e.g., prevent Root access).
- Encryption: Always enable encryption At Rest (managed by KMS) and In Transit (using TLS when mounting).
Advantages of AWS Elastic File System(EFS)
- EFS is scalable and elastic where you can scale the EFS depending on the data that is going to be stored. The scaling is done automatically.
- Multiple instances in AWS can access the EFS simultaneously. It makes it easy to share data across instances.
- Within the same region, the EFS replicates the data to the multiple availability zones.
- EFS allows you to take a backup of data from time to time so if there is any data loss you can always have backup.
- EFS supports a wide range of POSIX file system features, making it compatible with many Linux-based applications
Limitations of AWS Elastic File System(EFS)
There are a few limitations to consider when using AWS Elastic File System (EFS).
- EFS only supports the Network File System (NFS) protocol, so it can only be mounted and accessed by devices that support NFS.
- EFS has a maximum file size of 47.9 TB.
- EFS has a maximum throughput of 1000 MB/s per file system and a maximum of 16,000 IOPS per file system.
- EFS has a maximum number of files and directories that can be created within a single file system, which is determined by the size of the file system. For example, a 1 TB file system can support up to about 20 million files and directories.
- EFS is only available in certain regions, and it is not possible to migrate data between regions.
Pricing Model
EFS pricing is based on three dimensions:
- Storage: You pay per GB-month for data stored (Standard is expensive; IA is cheap).
- Throughput: If using Elastic Mode, you pay for data read/written (GB). If using Provisioned, you pay for the MB/s you reserve.
- Requests: In Infrequent Access (IA) mode, you pay per access request.
Cost Tip: Aggressively use Lifecycle Policies to move data to EFS IA. It reduces storage costs by up to 92%.

