What Is Amazon EFS? Sharing Files Across EC2 Servers
Amazon Elastic File System (EFS) is an AWS-managed file system that multiple compute clients can mount over a network. It suits Linux workloads where several EC2 instances need to read and write files at the same paths; this is different from copying a separate disk to each server. A shared file system does not automatically coordinate application writes or replace a backup. Choose the availability type, mount targets, network and file permissions, performance mode, lifecycle, and backup plan together. For the general model, see the [file storage guide](https://knowledge.linkspot.net/ko/articles/4fcac37b-6395-485f-b74f-5bec05878a31); for shared locking concepts, see the [shared file system guide](https://knowledge.linkspot.net/ko/articles/cee0d975-0097-4fe2-b137-dae5f9b84666).
Amazon Elastic File System (EFS) is an AWS-managed file system that multiple compute clients can mount over a network. It suits Linux workloads where several EC2 instances need to read and write files at the same paths; this is different from copying a separate disk to each server. A shared file system does not automatically coordinate application writes or replace a backup. Choose the availability type, mount targets, network and file permissions, performance mode, lifecycle, and backup plan together. For the general model, see the file storage guide; for shared locking concepts, see the shared file system guide.
How does EFS make files available to multiple servers?
EFS creates a file system that clients access as a Network File System using NFSv4 through mount targets in an Amazon VPC. A mount target is the network endpoint for the file system. Clients connect using the EFS DNS name, which can direct them to a mount target in the same Availability Zone (AZ). Multiple EC2 instances, containers, or other NFS clients can mount the same file system and use a common data path.
A Regional file system is designed to be accessed across multiple AZs in one AWS Region. Create a mount target in each AZ you plan to use. For latency and cross-AZ data charges, clients generally should use the target in their own AZ. A One Zone file system stores data and metadata redundantly within one AZ and can have only one mount target in that AZ. It does not provide the same resilience to an AZ outage as a Regional file system, so choose it only when its failure and recovery trade-offs fit your requirements.
The mount target’s security group acts as a network firewall. Check that the client can make an NFS connection on port 2049 to that security group. Mount targets for a file system can be configured in only one VPC at a time, so plan the VPC and subnets first. Network reachability is separate from file permissions: after the mount works, Linux users, groups, POSIX file permissions, and where needed EFS file-system policies and IAM client authorization still determine file access.
When is EFS a good fit?
EFS can be useful for shared uploads, content repositories, home directories, shared configuration files, and some container workloads where many servers need the same paths. With local disks on each server, files must be copied or synchronized; with a mounted EFS file system, clients see the shared files through a common path. If you need a high-performance block disk attached to one EC2 instance, EBS may fit better. If you store independent objects by key or manage large archives, object storage may be a more natural fit.
EFS is an NFS file share, not an automatic conflict manager. It does not resolve all simultaneous writes or file locks for the application. When multiple servers may edit the same file, confirm the lock and atomicity behavior provided by NFS and the application, then design a collision strategy. POSIX permissions control file access, while security groups control network access; both layers need review.
Hypothetical example: Suppose several EC2 web servers share user uploads at /srv/uploads. With local disks, an image may be missing when a load balancer sends a request to a different server, or the files may need synchronization. If every server mounts the same EFS file system, each can read the file at the same path. The team creates mount targets in the AZs it uses, restricts NFS port 2049, and sets the upload directory’s owner and POSIX permissions. If two servers might write the same filename, the application also needs a collision strategy such as unique names or application-level coordination. This example explains a design; it does not claim a deployment or performance test.
How should you choose storage classes and throughput?
EFS Standard is a starting point for frequently accessed files that need low latency. Infrequent Access (IA) is designed to lower storage cost for data accessed only a few times each quarter; Archive targets data accessed a few times a year or less. Lifecycle policies use the file’s last-access time in Standard to transition file contents into IA or Archive, and can optionally move them back into Standard. The policy applies across the file system. Check whether frequently accessed small files need to stay in Standard for faster response. Access costs and latency characteristics can differ for lower-cost classes, so verify the current pricing and retrieval requirements for your workload.
Throughput mode determines the rate at which the file system can read and write. Elastic throughput scales up or down with workload activity and is an easy choice to evaluate for spiky or hard-to-predict workloads. Provisioned throughput lets you specify a level independently of file-system size. Bursting throughput scales with the amount of data in Standard and can use accumulated burst credits for higher throughput for a limited time. If the credits are depleted, throughput can return to the baseline, so review CloudWatch usage metrics and the workload pattern rather than capacity alone.
Performance mode affects operation latency. General Purpose is the recommended mode for most file systems and has lower per-operation latency. Max I/O is a previous-generation option for highly parallel workloads that can tolerate higher latency; it is unavailable with some file-system configurations and cannot be changed after creation. Throughput and storage class are not the only factors: network path, file sizes, and concurrent clients also affect observed performance.
How should you plan security, encryption, and backups?
EFS can encrypt data and metadata at rest with AWS KMS; encryption is the recommended default for new file systems. The encryption setting cannot be changed after creation. To move an unencrypted file system to encryption, plan a new file system and data copy. For in-transit protection, enable TLS as a mount option; the EFS mount helper simplifies setting up that connection. Encryption at rest, encryption in transit, network firewall rules, and NFS user/group permissions are separate layers and should each be checked.
Shared access is not a backup plan. Deletion or application errors can affect files visible to every client. File systems created in the EFS console have AWS Backup automatic backups enabled by default; for Regional file systems created through the CLI or API, automatic backups might not be enabled by default, so verify the actual setting. AWS Backup can run while the file system is in use, but writes, renames, moves, or deletions during backup can make a recovery point inconsistent. When the workload allows, pause changes during a backup or schedule it for a quiet period, set retention to match recovery goals, and test restoration.
What should you verify before production use?
Identify the clients and VPCs that need the share, then choose Regional or One Zone based on availability and recovery requirements.
Create mount targets in the AZs clients use; confirm same-AZ access where practical and allow NFS port 2049 only from the required clients.
Confirm the NFS client or mount helper requirements, and align POSIX users, groups, directory ownership, and permissions with the application.
Match Standard/IA/Archive lifecycle and throughput mode to actual access frequency, latency needs, and cost monitoring.
Check at-rest and in-transit encryption, IAM or file-system policies, backup settings, retention, and a tested restore path.
Amazon EFS is a managed NFS file system for sharing files among AWS clients. It can simplify Linux applications that need common paths, but the design still depends on correct AZ connectivity, network rules, POSIX permissions, locking behavior, performance settings, and recovery. Decide which clients can connect, who can modify files, how access is coordinated, and how deleted or corrupted data will be restored.
References
[How Amazon EFS works and concurrent client access](https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html)
[EFS mount targets and Availability Zones](https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html)
[Creating EFS file systems and recommended settings](https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html)
[EFS performance and throughput modes](https://docs.aws.amazon.com/efs/latest/ug/performance.html)
[Managing EFS file-system throughput](https://docs.aws.amazon.com/efs/latest/ug/managing-throughput.html)
[EFS lifecycle management](https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html)
[Encryption in transit for EFS](https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html)
[Backing up EFS file systems](https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html)
[EFS file locking and data consistency](https://docs.aws.amazon.com/efs/latest/ug/features.html)