# EFS

> Source: Courseiva IT Certification Glossary — https://courseiva.com/glossary/efs

## Quick definition

Amazon EFS provides a simple, scalable file storage system in the AWS cloud. It grows and shrinks automatically as you add or remove files. Multiple virtual servers, containers, or on-premises servers can access the same files at the same time. You pay only for the storage you use, with no need to provision capacity in advance.

## Simple meaning

Imagine your company has a team of designers who all need to work on the same large project files, like video edits or 3D models. If each designer saved files only on their own computer, collaboration would be a nightmare, they would have to constantly email files, worry about version conflicts, and risk losing work if a laptop broke. Amazon EFS is like a magical shared folder in the sky. It sits in the AWS cloud and acts as a central repository that any authorized server or instance can mount and access, just like a local drive on your own computer. 

 The key magic is that EFS is elastic. If you store only 5 GB of data, it uses exactly 5 GB of space and you are billed for 5 GB. If you suddenly add 500 GB of new project files, EFS automatically grows to accommodate them without any manual intervention or downtime. You never have to guess how much storage you will need or worry about running out of space. 

 Think of it like a water pipe that expands or contracts depending on how much water is flowing through it. With traditional storage, you would have to install a fixed-size pipe and hope it is big enough. With EFS, the pipe magically changes size to match your needs, and you only pay for the water that actually flows through it. This makes EFS ideal for applications that need shared storage with unpredictable growth, such as content management systems, web serving, data analytics, and development environments.

## Technical definition

Amazon Elastic File System (EFS) is a fully managed, regional AWS service that provides scalable Network File System (NFS) file storage for use with Amazon EC2 instances, AWS Lambda, Amazon ECS, and on-premises servers via AWS Direct Connect or VPN. It implements NFSv4.1 and NFSv4.0 protocols, allowing standard POSIX file-level access with consistency and locking semantics. 

 EFS is built on a distributed architecture that spans multiple Availability Zones (AZs) within a single AWS Region. When you create an EFS file system, you specify a performance mode (General Purpose or Max I/O) and a throughput mode (Bursting or Provisioned). The General Purpose performance mode is suitable for latency-sensitive applications, while Max I/O is designed for high-throughput workloads like big data processing. For throughput, Bursting mode allows throughput to scale with the amount of stored data (using a credit mechanism), while Provisioned mode lets you set a fixed throughput level independent of storage size. 

 Access to EFS is controlled through security groups, Network Access Control Lists (NACLs), and IAM policies. Mount targets are created in each subnet where you want EC2 instances to mount the file system. These mount targets use the private IP addresses of the instances, keeping traffic within the AWS network and eliminating internet exposure. The file system data is encrypted at rest using AWS Key Management Service (KMS) and in transit using TLS. 

 EFS supports life cycle management, automatically moving files not accessed for a specified period (30, 60, or 90 days) to the Infrequent Access (IA) storage class at a lower cost. This is analogous to archive tiers in backup software but automated and transparent. EFS Replication provides cross-Region replication for disaster recovery and compliance. The service also offers data protection via automatic backups and versioning through AWS Backup. 

 In real IT implementations, EFS is commonly used as a shared file store for web server farms (e.g., WordPress across multiple EC2 instances), containerized applications (sharing configuration or code), data analytics pipelines (Apache Spark or Hadoop clusters needing shared input/output), and user home directories (centralized for enterprises). It integrates with AWS Directory Service for Active Directory authentication, enabling seamless integration with existing Windows-based or Linux-based identity services.

## Real-life example

Think of a large office building where multiple teams work on the same set of documents. In a traditional setup, each team might keep its own filing cabinet. If the marketing team needs a file from the engineering team, someone has to walk to a different floor, find the cabinet, and photocopy the document. If the file changes, the photocopy is outdated. That is like storing data on individual servers without shared storage. 

 Now imagine the office installs a central, digital filing system accessible from every desk. Any employee can open a document, edit it, and save it back, and everyone else instantly sees the latest version. The filing system has almost infinite capacity, when more documents are added, the system expands without needing new cabinets. It also automatically moves old, rarely-used documents to a cheaper, slower storage room in the basement to save money. 

 That central digital filing system is Amazon EFS. The desks represent EC2 instances or on-premises servers. The network is the AWS internal network, connecting each desk to the filing system. The automatic expansion is EFS’s elastic storage, and the moving of old files is its life cycle management to the Infrequent Access tier. The security is managed by who gets a key (IAM policies and security groups). This analogy makes it easy to understand why EFS is so powerful for any scenario where multiple servers need consistent, shared access to a growing set of files.

## Why it matters

In practical IT operations, managing file storage manually is a constant source of pain. You have to estimate capacity, provision disks, set up RAID arrays, manage NFS exports, ensure high availability across servers, and periodically clean up old data to free space. All of that takes time, expertise, and money. Amazon EFS eliminates nearly all of that overhead. 

 For a small startup running a web application, EFS allows them to deploy a load-balanced fleet of web servers that all read and write to the same file system. This means they can scale the number of servers up and down in minutes without worrying about data synchronization or file bottlenecks. The elasticity means they never pay for idle storage, if traffic is low and fewer files are generated, the storage shrinks and the bill drops. 

 For larger enterprises, EFS provides a centralized storage solution that can be accessed from on-premises data centers via AWS Direct Connect. This enables hybrid cloud architectures where critical data lives in the cloud but is accessible with low latency from on-premises applications. The integration with AWS Backup makes it easy to set up automated backup policies meeting compliance requirements. 

 The security features matter because data breaches are costly. EFS encryption at rest and in transit protects sensitive information. IAM policies give fine-grained control over who can mount or modify the file system. This is crucial for industries like healthcare (HIPAA) or finance (PCI DSS) where data protection is not optional. Overall, EFS reduces operational complexity, increases agility, and lowers total cost of ownership for shared file storage needs.

## Why it matters in exams

For the AWS Certified Cloud Practitioner (CLF-C02) exam, EFS appears primarily in the context of core storage services. Candidates need to understand that EFS is a file storage service (as opposed to block storage like EBS or object storage like S3). The key differentiator is that EFS can be mounted by multiple EC2 instances simultaneously across multiple Availability Zones, whereas EBS volumes are tied to a single AZ. Cloud Practitioner questions often ask which storage service is best for shared file access or which service is regionally resilient. Expect scenario-based questions like "A company needs shared storage for a web application running on multiple EC2 instances in different AZs. Which service should they use?" The answer is EFS. 

 For the AWS Solutions Architect Associate (SAA-C03) exam, the depth required is greater. You must understand performance modes (General Purpose vs. Max I/O), throughput modes (Bursting vs. Provisioned), storage classes (Standard vs. IA), and life cycle policies. The SAA exam will test your ability to design solutions using EFS correctly. For example, you might be given a scenario with a data analytics workload that requires high throughput and is latency-tolerant. You would need to recommend Max I/O performance mode. Or you might be asked to reduce costs for a file system where 80% of files are accessed only once a year; the answer would involve life cycle management to move old files to EFS IA. You should know when to use EFS versus EBS versus S3. Common trap questions involve cross-AZ access: EBS cannot be used across AZs, while EFS inherently is. Understanding mount targets and security groups is also important for the SAA exam.

## How it appears in exam questions

Exam questions about EFS tend to fall into three main patterns: scenario selection, configuration choices, and limitations/mistakes. 

 In scenario selection questions, you are given an application requirement and must pick the right storage service. For example: "A company runs a content management system on a fleet of EC2 instances across two Availability Zones. All instances need to access the same set of uploaded media files. Which storage solution is most cost-effective and scalable?" The correct answer is Amazon EFS. Wrong options often include EBS (since it is single-AZ) and S3 (since it is object storage, not file-level access). 

 Configuration choice questions require deeper knowledge. For instance: "A research team uses EC2 instances to run simulations that generate terabytes of intermediate data. The data is read and written concurrently by multiple instances. The workload is very throughput-intensive and can tolerate higher latency. Which EFS performance mode should be selected?" The answer is Max I/O. Another example: "A web hosting company uses EFS to store website files. Most files are accessed only once a month. How can they reduce costs without losing access?" The correct answer is to configure a life cycle policy to move files older than 30 days to EFS Infrequent Access. 

 The third pattern focuses on understanding what EFS cannot do. Questions might ask: "Which of the following is NOT a feature of Amazon EFS?" with options like "Block-level access for a single EC2 instance" (that is EBS) or "Shared file access across multiple Regions" (EFS is regional, not global, though you can replicate across Regions). Another common trap is thinking EFS supports Microsoft Windows natively, it does not (NFS is Linux/Unix protocol). There have been questions where a Windows-based application needs shared storage, and EFS would not be the right choice unless using a third-party NFS client for Windows. 

 Multi-part questions may also ask about security: "Which mechanism controls which EC2 instances can mount an EFS file system?" The answer is security groups associated with mount targets, combined with IAM policies. Monitoring and logging questions might ask about CloudWatch metrics for EFS (e.g., burst credit balance).

## Example scenario

A small media production company called BrightFrame creates short promotional videos for local businesses. They have three video editors who work on different parts of a project simultaneously. Each editor uses a separate EC2 instance running video editing software. The raw footage must be shared among all editors, and the final output files need to be accessible from a central location. 

 The company currently has each editor storing files on a separate EBS volume attached to their instance. But when Editor A finishes a rough cut, she must upload the file to a shared S3 bucket for Editor B to download. This wastes time and creates version confusion. The owner, frustrated with the inefficiency, asks an AWS solutions architect for help. 

 The architect recommends setting up a single Amazon EFS file system in their AWS region. A mount target is created in each subnet where the EC2 instances reside (three Availability Zones for high availability). Each editor's instance mounts the same EFS file system at /mnt/videos. Now, when Editor A saves a file, Editor B sees it instantly. The company also enables life cycle management to move old project files (older than 90 days) to EFS Infrequent Access, reducing storage costs by 60%. They set up automatic backups using AWS Backup to prevent data loss. 

 The result is a seamless collaborative environment. The editors work faster, there is no more file version chaos, and the storage bill is predictable because EFS automatically scales. This scenario perfectly illustrates why EFS is the go-to choice for any multi-instance, shared file workload.

## Common mistakes

- **Mistake:** Thinking EFS is block-level storage like EBS, suitable for a single EC2 instance only.
  - Why it is wrong: EFS is a file-level storage system that uses NFS protocols designed for concurrent access from multiple instances. Using it as a block device would not work, and its strength is shared access, not single instance performance.
  - Fix: Remember that EFS is for shared file storage (multiple instances can mount it), while EBS is for dedicated block storage (single instance, single AZ). Use EFS when you need a common filesystem across servers.
- **Mistake:** Assuming EFS automatically replicates data across Regions for disaster recovery.
  - Why it is wrong: By default, an EFS file system is regional and resilient only within a single Region. Cross-Region replication is available as a separate feature (EFS Replication) that must be explicitly configured, and it incurs additional costs.
  - Fix: When a question mentions needing cross-Region DR, check if EFS Replication is mentioned. Otherwise, consider other services like S3 Cross-Region Replication or AWS Backup cross-Region copy.
- **Mistake:** Believing EFS can be accessed from on-premises servers without any special network connection.
  - Why it is wrong: EFS mount targets use private IP addresses in the AWS VPC. To access EFS from on-premises, you must establish a network path using AWS VPN or AWS Direct Connect. Simply having internet access is not sufficient.
  - Fix: If an exam scenario requires on-premises access to EFS, look for keywords like AWS Direct Connect or VPN. EFS does not have a public endpoint by default.
- **Mistake:** Selecting EFS for a Windows-only environment without verifying NFS support.
  - Why it is wrong: EFS uses NFS protocols, which are native to Linux and Unix systems. Windows Server does not include native NFS support, though a third-party NFS client can be installed. This adds complexity and may not be supported in all environments.
  - Fix: If the question states the application runs on Windows and requires shared file storage, consider Amazon FSx for Windows File Server instead of EFS.
- **Mistake:** Confusing EFS performance modes with EBS volume types (e.g., GP2, GP3, io1).
  - Why it is wrong: EFS performance modes (General Purpose vs Max I/O) and throughput modes (Bursting vs Provisioned) are separate concepts from EBS volume types. They address different aspects: EFS modes optimize for latency vs throughput, while EBS types optimize for IOPS vs throughput at the block level.
  - Fix: On the exam, when you see EFS, focus on General Purpose for low-latency and Max I/O for high-throughput. Don't mix in EBS concepts.

## Exam trap

{"trap":"A question presents a scenario where a single EC2 instance needs a highly available, persistent file system that can be accessed from a failover instance in another Availability Zone if the first instance fails. The wrong answer suggests using an EBS volume and simply detaching and reattaching it to the second instance.","why_learners_choose_it":"Learners unfamiliar with EFS might think EBS volumes can be moved between AZs because they have heard about EBS snapshots and copying. They may also underestimate the complexity of detaching and reattaching volumes during a failover, especially if there are many files. The trap makes the EBS solution sound straightforward.","how_to_avoid_it":"Remember that EBS volumes are tied to a specific Availability Zone. To move an EBS volume to another AZ, you must create a snapshot, copy it to the target AZ, and then create a new volume from the snapshot, a process that takes minutes, not seconds. In contrast, EFS is designed from the ground up for cross-AZ access. Multiple instances in different AZs can mount the same EFS file system simultaneously, providing instant failover without any data movement. The correct solution for the scenario is EFS, not EBS."}

## Commonly confused with

- **EFS vs Amazon EBS (Elastic Block Store):** EBS provides block-level storage volumes that are attached to a single EC2 instance in one Availability Zone. While multiple EBS volumes can be attached to one instance, one EBS volume cannot be attached to multiple instances (except with Multi-Attach enabled for specific volume types like io1/io2, but even then only within the same AZ). EFS, on the other hand, is a file-level NFS service that can be mounted by hundreds of EC2 instances across multiple AZs simultaneously. (Example: For a database running on a single server, use EBS. For a shared document repository accessed by many web servers across AZs, use EFS.)
- **EFS vs Amazon S3 (Simple Storage Service):** S3 is object storage, not file storage. You access S3 via API calls (HTTP/HTTPS) and store objects in buckets with a flat namespace. It does not support file system operations like locking, directories, or mounting via NFS (without a third-party gateway). EFS is fully POSIX-compliant, so applications that expect a traditional filesystem can use it with no code changes. (Example: For storing static website assets (images, CSS), use S3. For a shared configuration directory that multiple servers read using standard file system commands, use EFS.)
- **EFS vs Amazon FSx for Windows File Server:** FSx for Windows File Server is a fully managed Windows-native file server that supports the SMB protocol. It is designed for Windows workloads requiring Active Directory integration, Windows file sharing, and features like Shadow Copies and DFS. EFS uses NFS (Linux/Unix protocol) and does not natively support SMB or Active Directory integration (though it supports AD for authentication via Kerberos, but it is not the same seamless Windows experience). (Example: For a Windows-based application needing shared storage with Windows ACLs, use FSx for Windows. For a Linux-based application needing shared NFS storage, use EFS.)

## Step-by-step breakdown

1. **Create the EFS File System** — In the AWS Management Console or via API, you create a new file system. You specify the region, select a performance mode (General Purpose or Max I/O), and choose a throughput mode (Bursting or Provisioned). This step defines the fundamental behavior of the storage. You also choose whether to enable encryption at rest.
2. **Configure Network Access (Mount Targets)** — EFS requires mount targets in your VPC. For each subnet where you will have EC2 instances that need access, you create a mount target. Each mount target gets a private IP address from the subnet. This is critical because without a mount target in a subnet, instances in that subnet cannot mount the file system.
3. **Set Up Security Groups** — You attach a security group to each mount target. This security group acts as a virtual firewall, controlling inbound traffic on NFS port 2049. Typically you allow inbound NFS traffic only from the security groups assigned to your EC2 instances. This ensures only authorized instances can connect.
4. **Mount the File System on EC2 Instances** — On each Linux EC2 instance, you install the NFS client (if not already present) and use the mount command to attach the EFS file system to a local directory (e.g., mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-12345678.efs.us-east-1.amazonaws.com:/ /mnt/efs). The mount point is persistent across reboots if added to /etc/fstab.
5. **Manage Data and Lifecycle** — You can use the EFS management console to create lifecycle policies that automatically move files to the Infrequent Access storage class after a set number of days (30, 60, or 90). This reduces costs without any application changes. You can also enable automatic backups via AWS Backup for data protection.
6. **Monitor and Scale** — EFS automatically scales storage capacity as you add files. You can monitor metrics like BurstCreditBalance, Throughput, and PercentIOLimit via Amazon CloudWatch to ensure performance remains as expected. If throughput needs increase, you can switch to Provisioned Throughput mode.

## Practical mini-lesson

In practice, using Amazon EFS involves more than just creating a file system and forgetting about it. Professionals need to understand the interplay between performance modes, throughput, and cost to design efficient solutions. 

 First, always consider the access pattern. General Purpose performance mode is suitable for most web serving, content management, small-scale analytics, and development environments. It offers consistent low latency (single-digit millisecond) and is the default. However, if your workload involves many concurrent clients performing heavy read/write operations (e.g., large-scale data processing, HPC, video rendering, genome analysis), you might need Max I/O mode. Max I/O scales to higher levels of aggregate throughput but can increase latency. A common mistake is choosing Max I/O for a latency-sensitive application and then wondering why response times are higher. 

 Next, throughput and bursting credits are a common source of confusion. In Bursting mode, an EFS file system accumulates burst credits based on the amount of data stored. For example, a file system with 1 TB of data gets a baseline throughput of 50 MB/s and can burst to 100 MB/s for a limited time using credits. If your application continuously consumes more throughput than the baseline, you will eventually exhaust the credit balance, throttling performance. For sustained high throughput, you must either increase stored data (to raise baseline) or switch to Provisioned Throughput mode (which allows setting a fixed throughput, independent of stored data, at a higher price). 

 Cost optimization is a major part of real-world use. EFS Standard costs roughly $0.30/GB per month, while EFS IA costs about $0.025/GB per month (rates vary by region). Lifecycle policies can drastically reduce costs for file systems with infrequently accessed data. For example, a file system that holds 100 GB of active data and 900 GB of cold data can cost $300/month if all in Standard, but only $52.50/month if the cold data automatically moves to IA. The catch is that accessing data in IA incurs a retrieval charge ($0.01/GB read), so it is not suitable for frequently accessed files. 
 
 Security in practice means using private subnets for mount targets, restricting inbound NFS traffic to specific security groups, and using IAM policies to control which users or roles can create, modify, or delete file systems. Encryption in transit is configured via the NFS client options (e.g., using TLS), and encryption at rest is enabled at creation time. There is no way to enable encryption at rest on an existing unencrypted file system, you must create a new one and migrate data. 
 
 Common issues include misconfigured security groups (blocking NFS port 2049), incorrect mount options (missing hard mount option leading to stale file handles), and hitting throughput limits during heavy data loads. Monitoring with CloudWatch is essential to detect these problems early.

## Memory tip

EFS = Elastic File Storage, think "Extra Flexible Share", it can be mounted by many EC2 instances across different Availability Zones, unlike EBS which is stuck in one zone for one instance.

## FAQ

**Is EFS regionally resilient or does it only exist in one Availability Zone?**

EFS is regionally resilient. Data is automatically stored and replicated across multiple Availability Zones within the region by default. If one AZ fails, the file system remains accessible from other AZs.

**Can I access EFS from the internet directly?**

No, EFS does not have a public internet endpoint. You must access it through an AWS VPC, either from an EC2 instance inside the VPC or via an on-premises connection like AWS Direct Connect or VPN.

**Does EFS support Windows instances?**

EFS uses NFS, which is native to Linux. Windows Server can access EFS using a third-party NFS client, but it is not a seamless experience and may have limitations. For native Windows shared storage, use Amazon FSx for Windows File Server.

**How do I reduce costs on EFS without losing data?**

You can configure lifecycle management to move files not accessed for 30, 60, or 90 days to the EFS Infrequent Access (IA) storage class. IA is much cheaper per gigabyte but charges a retrieval fee when data is read.

**What is the difference between Bursting and Provisioned Throughput modes?**

Bursting mode allows you to use baseline throughput based on the amount of data stored, plus burst credits for short spikes. Provisioned mode lets you set a fixed throughput rate, which costs more but provides consistent performance even if stored data is low.

**Can I mount the same EFS file system on EC2 instances in different AWS Regions?**

No, EFS is a regional service. You cannot mount the same file system across different regions. For cross-region access, you must use EFS Replication or a third-party solution and mount the replica in the other region.

**What happens if my EFS file system runs out of burst credits?**

When burst credits are exhausted, throughput is limited to the baseline rate of the file system. This can cause performance degradation for applications that require high throughput. To avoid this, you can either increase stored data (to raise baseline) or switch to Provisioned Throughput.

## Summary

Amazon EFS is a fully managed, scalable, and elastic file storage service designed for shared access across multiple EC2 instances, both in the same and across different Availability Zones. It is built on the NFS protocol, making it native to Linux environments, and provides automatic scaling, lifecycle management for cost savings, and robust security with encryption at rest and in transit. Understanding EFS is crucial for AWS certification exams because it appears frequently in scenario-based questions that test your ability to select the right storage solution for multi-instance, shared file workloads. 

 In the Cloud Practitioner exam, you primarily need to recognize that EFS is for shared file storage (as opposed to EBS block storage or S3 object storage). In the Solutions Architect Associate exam, you must know the performance modes, throughput options, lifecycle policies, and how to secure mount targets. Common mistakes include confusing EFS with EBS, assuming it works across regions without configuration, or thinking it supports Windows natively. 

 The key takeaway for exam success is to associate EFS with any scenario requiring shared file storage that multiple servers across different Availability Zones need to access simultaneously. Think of it as the "shared network drive" of the AWS cloud for Linux workloads, and remember that its automatic scaling and lifecycle management make it both powerful and cost-effective. With this understanding, you will be well-prepared to answer EFS questions correctly and design efficient AWS architectures in the real world.

---

Practice questions and the full interactive page: https://courseiva.com/glossary/efs
