EFS separates shared file storage from the clients using it. Choose data placement and performance settings, establish mount-target connectivity, then apply access-point and file permissions.
EFS basics
Amazon Elastic File System (Amazon EFS) is a shared file system that grows and shrinks with the files stored in it.
How it works
- Create a file system.
- MountConnecting a remote file system to a local directory for file access. it on many instances or containers.
- Capacity grows and shrinks automatically.
Exam cues
- If the question says shared file storage for many Linux instances, think EFS.
Remember
- Elastic, shared, no capacity to provision.
Trap: EFS is shared file storage; EBS is a disk for one instance at a time.
From the AWS docs (10)
- Amazon EFS provides serverless, fully elastic file storage that many clients can share, growing to petabytes without provisioning capacity.
- The documented default IA transition moves files after 30 days without access in Standard.
- The documented default Archive transition moves files after 90 days without access in Standard.
- Archive requires Elastic throughput; an Archive transition policy prevents switching to Bursting or Provisioned.
- EFS provides elastic shared file storage over NFS versions 4.0 and 4.1 for concurrent clients.
- EFS supports POSIX file permissions, using numeric users and groups to control file access.
- Regional EFS stores data redundantly across multiple AZs in one Region and remains available when an AZ is unavailable.
- Regional EFS can have one mount target per AZ; clients should use a target in their own AZ for performance and cost.
- EFS clients need outbound TCP 2049 to the mount target, and its security group must allow inbound TCP 2049 from those clients.
- An EC2 instance in a different AWS Region from an EFS file system can mount it, after setting the file system Region in efs-utils.
Regional and One Zone file systems
Amazon EFS provides shared files that multiple clients can read and write over Network File SystemA protocol that lets clients access shared files across a network. (NFS), a protocol for accessing files across a network. Regional and One Zone determine where EFS keeps its data; throughputThe rate at which a file system can transfer data. and lifecycle settings control performance and storage placement.
How it works
- Choose Regional for data stored across Availability Zones (AZs), separate locations within a Region. One Zone stores all copies within one AZ.
- Create a mount targetAn EFS network endpoint with an address used by NFS clients., the network address used to mountConnecting a remote file system to a local directory for file access. the file system, in each Regional client AZ. Allow TCP 2049 from clients to the targets. One Zone has one mount target in its storage AZ.
- Select a performance mode, which affects per-operation latencyThe time taken to complete a file operation., and a throughput mode, which controls how much data the file system can move over time.
- Apply lifecycle policies to move inactive files from Standard into Infrequent AccessA storage class for files that are read less often than active Standard data. (IA) or Archive. EFS tracks access using an internal timer rather than the visible POSIXUnix-style file access rules based on numeric user and group identities. access timestamp. POSIX permissions are the Unix-style user, group, and file permission model.
| Setting | Behavior | Selection cue |
|---|---|---|
| General Purpose performance | Default; lower per-operation latency | AWS recommendation for all file systems |
| Max I/O performance | Previous generation; higher latency | Unsupported on One Zone and with Elastic |
| Elastic throughput | Default; follows demand without credits | Unpredictable activity |
| Provisioned throughput | Capacity specified independently of size | Known throughput requirement |
| Bursting throughput | Baseline follows Standard data size; credits permit bursts | Performance that scales with stored data |
| Compute client | Shared storage behavior |
|---|---|
| EC2 | Multiple NFS clients share a file system |
| ECS, including supported Linux Fargate tasks | EFS volumes persist across task placement |
| EKS Fargate | EFS persistent volumes use static provisioningPreparing a persistent volume in advance for a workload to use., prepared in advance |
Exam cues
- If the question says a shared writable Linux directory must survive an AZ outage, think Regional EFS with local mount targets, because data spans AZs.
- If the question says unpredictable throughput without credit management, think Elastic, because capacity follows workload demand.
- If the question says reduce storage cost for inactive files, think lifecycle policies, because they move content into IA or Archive.
- If the question says EKS Fargate needs shared persistent files, think statically provisioned EFS, because those pods cannot mount EBS volumes.
Remember
- NFS versions: 4.0 and 4.1. Network port: TCP 2049.
- Regional: one mount target per AZ. One Zone: a single target in its storage AZ; access from other AZs incurs cross-AZ data access charges.
- Return to Standard on access is disabled by default. Configure
On first accessto return active files to Standard. - Encryption key: AWS owned
aws/elasticfilesystemby default, or a customer managed KMS key. - Automatic AWS Backup: on by default from the console; from the CLI or API only for One Zone.
Trap: A mount target in another AZ does not change One Zone’s data placement. One Zone still keeps its copies in one AZ, where a disaster affecting those copies can cause data loss.
Trap: A throughput mode and a performance mode are separate choices. Max I/O does not mean automatically scaling throughput.
The client in AZ A mounts the shared Regional file system through its local mount target.
The client in AZ B mounts the same file system through its own AZ mount target.
From the AWS docs (19)
- EFS provides elastic shared file storage over NFS versions 4.0 and 4.1 for concurrent clients.
- Regional EFS stores data redundantly across multiple AZs in one Region and remains available when an AZ is unavailable.
- One Zone EFS stores data in one AZ, so a disaster affecting all copies in that AZ can cause data loss.
- Regional EFS can have one mount target per AZ; clients should use a target in their own AZ for performance and cost.
- One Zone EFS has a single mount target in its storage AZ; clients in other AZs can access it but incur cross-AZ data access charges.
- General Purpose is the default performance mode and has lower per-operation latency than Max I/O; One Zone always uses General Purpose.
- Max I/O is a previous-generation mode with higher latency and is unsupported with One Zone or Elastic throughput; AWS recommends General Purpose.
- Elastic is the default throughput mode, automatically follows workload demand, and does not use burst credits.
- Provisioned throughput lets you specify throughput independently of file system size and burst-credit balance.
- Bursting throughput bases baseline capacity on data stored in Standard and uses credits for activity above baseline.
- EFS lifecycle policies apply across a file system and use an internal last-access timer rather than visible POSIX access attributes.
- Files do not return from IA or Archive to Standard on access by default; configure On first access to enable return.
- EFS volumes let ECS tasks access the same persistent files across container instances; Linux Fargate tasks support EFS on platform 1.4.0 or later.
- EKS supports EFS persistent volumes on Fargate using static provisioning, where the volume is prepared in advance; dynamic provisioning is unsupported there.
- EBS volumes cannot be mounted to EKS Fargate pods.
- On-premises servers can mount an Amazon EFS file system when connected to the VPC with AWS Direct Connect or Site-to-Site VPN.
- EFS charges per GB for reads and writes, plus an extra per-GB charge to read data from the Infrequent Access and Archive storage classes.
- EFS encrypts file data at rest with either the AWS owned key aws/elasticfilesystem (default, no extra charge) or a customer managed KMS key for more control and auditing.
- File systems created in the EFS console are backed up by AWS Backup automatically by default; through the CLI or API, automatic backups are on by default only for One Zone file systems.
Mount targets and access points
An EFS mount targetAn EFS network endpoint with an address used by NFS clients. provides network connectivity; an access pointAn application entry point that can enforce a directory root and file-operation identity. defines how an application sees and identifies itself to the shared file system. A root directoryThe top directory visible to a client through its mounted file system. is the top folder visible through that mountConnecting a remote file system to a local directory for file access.. A POSIXUnix-style file access rules based on numeric user and group identities. identity is a Unix-style user and group used for file operations.
How it works
- Create mount targets in the file system’s VPC. Regional file systems allow one per AZ, and all targets for one file system belong to one VPC at a time.
- Establish private connectivity. The client security group allows outbound TCP 2049 and the target group allows inbound TCP 2049 from clients. Connected VPCs and on-premises networks need suitable private paths.
- Configure the access point’s root directory and optional enforced user and group.
- Mount using the EFS helper with
tlsandaccesspoint=. TLSEncryption that protects data while clients send it to a file system. encrypts the connection in transit. IAM authorization also uses the helper. - Evaluate identity and file system policies, then file permissions. Require the intended access point with
elasticfilesystem:AccessPointArnwhen applications must not bypass that entry point.
| Control | What it controls |
|---|---|
| Mount target and security group | The network path and permitted clients |
| Access point | Application root directory and optional enforced POSIX identity |
| IAM client authorization | NFSA protocol that lets clients access shared files across a network. client permissions |
| File permissions | Access to files |
Exam cues
- If the question says applications share EFS but need different visible directories, think access points plus IAM enforcement, because each mount can expose its own root and identity.
- If the question says mounting times out despite permissions, think the mount target’s private network path and TCP 2049, because authorization cannot create connectivity.
- If the question says a Lambda function needs shared persistent files across a connected account, think EFS access-point configuration plus network and permission checks, because each layer is required.
Remember
- Security groups attach to mount targets, not access points.
- EFS evaluates both identity and file system policies; permission does not universally need an allow in both.
- Without a user-configured file system policy, the default permits reachable anonymous clients. POSIX file permissions still apply.
Trap: An access point does not replace a mount target. Both the network path and application authorization must work.
From the AWS docs (13)
- A mount target provides the NFS endpoint address for an EFS file system in a VPC.
- Regional EFS allows one mount target per AZ, and a file system has mount targets in only one VPC at a time.
- The client needs outbound TCP 2049, and the mount target needs inbound TCP 2049 from the client.
- Clients in connected VPCs or on-premises networks can reach EFS mount targets through suitable private connectivity.
- An access point can enforce a directory as the client root, restricting that mount to the directory and its descendants.
- An access point can replace client user and group IDs with configured POSIX user and group IDs for file operations.
- Access points require at least one mount target; security groups attach to mount targets rather than access points.
- IAM policies can require a particular access point using elasticfilesystem:AccessPointArn.
- Access-point mounts use the EFS mount helper with tls and accesspoint= options; IAM authorization also requires the helper.
- EFS evaluates IAM identity and file system resource policies for NFS client permissions; an allow can come from either, subject to applicable explicit denies.
- Without a user-configured file system policy, the default permits anonymous clients that can connect through a mount target; file permissions still apply.
- Lambda file-system configuration mounts EFS through an access point so function invocations can share files.
- Lambda can use EFS through a cross-account VPC path when routing, security groups, IAM permissions, access-point access, and file permissions permit it.
Replication and failover
EFS replication maintains a recovery file system by copying source files and metadataInformation describing files and directories, such as ownership and directory structure., information such as file ownership and directory structure. Recovery Point ObjectiveThe acceptable amount of data loss expressed as time behind the source. (RPO) describes how far behind the source a recovery copy may be. Replication is asynchronous, so source writes can be newer than the replica.
How it works
- Choose a new or existing destination in the selected Region. Before reusing an existing file system, disable its default replication overwrite protection and plan for its contents to be updated to match the source.
- Wait for initial synchronization. Replica data becomes accessible after it finishes, and duration depends on size and file count.
- Monitor
TimeSinceLastSyncand the last synced time. The destination remains read-only to clients while replication is configured. - For failoverSwitching application use from a primary system to a recovery copy., delete the replication configuration. The replica becomes writable; direct the recovery application to it.
- For failbackReturning application operation to the original primary after recovery., decide whether to keep writes made at the recovery site. Replicate those changes back before restoring the original direction if they must survive.
| Recovery choice | Action | Result |
|---|---|---|
| Fail over | Delete replication configuration | Replica becomes writable |
| Preserve recovery-site changes | Replicate former replica back to primary | Primary receives the changes |
| Discard recovery-site changes | Recreate primary-to-replica configuration | Replica is updated to match primary |
Exam cues
- If the question says a shared file system needs a recovery copy in another Region, think EFS replication, because it copies file data and metadata to the selected destination.
- If the question says the recovery copy rejects writes, think delete the replication configuration for failover, because an active replication destination is read-only.
- If the question says preserve writes made during failover, think reverse replication before restoring the original direction, because primary-to-replica synchronization discards divergent replica changes.
Remember
- RPO after initial sync: 15 minutes for most file systems, not an unconditional maximum.
- Frequently changing sources with more than 100 million files or files larger than 100 GB may take longer.
- Monitor
TimeSinceLastSync; source changes after the last synced time might not have reached the replica.
Trap: Failback direction determines which changes survive. Recreating the original replication direction can discard the writes made at the recovery site.
EFS copies source data and metadata to the destination; the destination stays read-only while replication is configured.
Delete the replication configuration to make the destination writable, then direct the recovery application to it.
From the AWS docs (12)
- EFS replication copies file data and metadata to a destination file system in the selected Region.
- Replication supports a new destination or an existing destination, including an existing destination in a different account.
- Replication transfers changes asynchronously relative to application writes; Last synced identifies the point through which source changes reached the destination.
- Replica data is accessible only after initial synchronization completes, whose duration depends on source size and file count.
- After initial synchronization, EFS maintains an RPO of 15 minutes for most file systems; frequently changing sources with over 100 million files or files larger than 100 GB may take longer.
- TimeSinceLastSync is the EFS CloudWatch metric for monitoring time since the last successful replication synchronization.
- A destination in REPLICATING state is read-only to clients and modified only by EFS replication.
- Replication overwrite protection is enabled by default; disable it before using an existing file system as a replication destination.
- Replication to an existing destination applies source differences to that destination, so its contents are updated to match the source.
- Deleting the replication configuration makes the replica writable so the application can use it after failover.
- To preserve writes made during failover, replicate from the former replica back to the original primary before restoring the original direction.
- Recreating the original primary-to-replica configuration overwrites replica changes to match the primary, discarding failover changes.
EFS operational controls
Amazon EFS operational settings control client access, storage transitions, and replication across accounts. These checks help diagnose failed mountsConnecting a remote file system to a local directory for file access. or writes and configure storage and replication permissions.
How it works
- For a failed write, check the IAM client actions:
ClientMountgrants read-only access,ClientWriteauthorizes writes, andClientRootAccessauthorizes root use. Check the POSIX permissionsUnix-style file access rules based on numeric user and group identities. for the numeric user and group as well. - For a failed access-point mount, check whether its root directoryThe top directory visible to a client through its mounted file system. exists. If it does not, specify creation ownership and permissions so EFS can create it.
- Review the lifecycle transition defaults for Infrequent AccessA storage class for files that are read less often than active Standard data. (IA) and Archive. Archive requires Elastic throughputThe rate at which a file system can transfer data.; an Archive transition policy prevents switching to Bursting or Provisioned throughput.
- For cross-account replication, supply an IAM role and grant the configuring identity
iam:PassRoleto pass it.
Exam cues
- If the question says an EFS mount succeeds but writes fail, think
ClientWriteand POSIX file and directory permissions, becauseClientMountauthorizes read-only access. - If the question says an access-point root is missing and no creation permissions are supplied, think mount failure, because EFS cannot create the root without ownership and permissions.
- If the question says an Archive transition policy blocks a throughput change, think Elastic throughput, because Archive requires it.
- If the question says replication crosses AWS accounts, think a supplied IAM role and
iam:PassRole, because the EFS service-linked role cannot be used for cross-account replication.
Remember
- The documented default transitions are 30 days without access in Standard for IA and 90 days for Archive.
ClientRootAccessauthorizes root use;ClientWriteauthorizes writes.
Trap: A successful mount does not establish write permission. Check both
ClientWriteand the effective user and group’s POSIX permissions.
From the AWS docs (4)
- ClientMount authorizes read-only access, ClientWrite authorizes writes, and ClientRootAccess authorizes use of root.
- EFS checks numeric POSIX user and group identities against file and directory permissions.
- An access-point root directory must exist or specify creation ownership and permissions; otherwise mounting the access point fails.
- Cross-account replication requires a supplied IAM role and cannot use the EFS service-linked role; passing a role requires iam:PassRole.
Flashcards
Nothing to review here right now. Pick other topics or another filter.
·
All 27 cards as a list
Many Linux EC2 instances must read and write the same files at the same time. Which AWS storage service fits?
Amazon EFS, a shared, elastic file system.
What are the documented EFS lifecycle transition defaults for IA and Archive?
After 30 days without access in Standard for IA, and after 90 days for Archive. Archive requires Elastic throughput.
Which AWS service gives Linux clients shared POSIX file storage across AZs, and what network access does it need?
Regional EFS over NFS. Use a mount target in each client AZ, client outbound TCP 2049, and mount-target inbound TCP 2049.
Can an EC2 instance in another AWS Region mount an Amazon EFS file system?
Yes. Configure efs-utils with the file system's Region; the instance also needs network access to the file system.
How do EFS Regional and One Zone differ in data placement and AZ failure exposure?
Regional stores data across multiple AZs and tolerates an unavailable AZ. One Zone stores all copies in one AZ, so an AZ disaster affecting those copies can cause data loss.
A Linux application runs in three AZs and needs one writable shared directory available during an AZ outage. Which EFS configuration fits?
Regional EFS with a mount target in each client AZ. It stores data across AZs and lets those clients share one file system.
An EFS workload has unpredictable throughput and should not manage burst credits. Which throughput mode fits?
Elastic throughput. It automatically follows workload demand and does not use burst credits.
An EFS workload needs a known throughput level independent of stored size. Which mode fits?
Provisioned throughput. Bursting instead depends on Standard storage size and available credits.
An EFS application needs low per-operation latency. Should the team select Max I/O simply because it expects parallel access?
Use General Purpose, the default AWS recommendation. Max I/O has higher per-operation latency and is unsupported with One Zone or Elastic throughput.
An EFS file has moved to IA and becomes active again. Does a read automatically return it to Standard under the default policy?
No. Configure the return-to-Standard policy as On first access. The default keeps accessed files in IA or Archive.
EKS Fargate pods need shared persistent files. Which storage option fits, and how should volumes be provisioned?
EFS with statically provisioned persistent volumes. EFS dynamic provisioning is unsupported on Fargate, and EBS volumes cannot be mounted to Fargate pods.
Can on-premises Linux servers mount an Amazon EFS file system?
Yes, when the data center connects to the VPC with AWS Direct Connect or Site-to-Site VPN.
Does reading files from EFS Infrequent Access storage cost more than from EFS Standard?
Yes. IA and Archive reads add a per-GB charge on top of the normal read charge, which is why they suit rarely accessed data.
An Amazon EFS file system must be encrypted with a key whose use the security team controls and audits. Which key should it choose?
A customer managed KMS key. The default AWS owned key costs nothing extra but gives less control.
A team creates an Amazon EFS Regional file system through the API and assumes AWS Backup protects it automatically. Is that right?
No. Automatic backups are on by default for console-created file systems, and through the API only for One Zone file systems.
What controls can an EFS access point enforce, and does it replace the mount target?
An application root directory and optional POSIX user and group identity. It still uses a mount target for connectivity. Use the EFS mount helper with tls and accesspoint= options; IAM can require the chosen access point.
Two applications share EFS but must use separate directories and fixed Unix identities. How should access be configured?
Give each application an access point with its own enforced root and POSIX identity. Require the appropriate access point in IAM policies.
An EFS client has IAM permission and an access point but its mount connection times out. What should the team check?
Private connectivity to a mount target, outbound TCP 2049 from the client, and inbound TCP 2049 at the target. An access point does not supply network connectivity.
A Lambda function must share persistent files through EFS in a connected account. Are access-point permissions alone sufficient?
No. It also needs routed VPC connectivity, security-group access, appropriate IAM permissions, and file permissions. Configure the Lambda EFS access point.
How should a team maintain an EFS disaster-recovery copy in another Region and monitor lag?
Configure EFS replication and monitor TimeSinceLastSync. After initial synchronization, the RPO is 15 minutes for most file systems, with documented exceptions. The destination is read-only during replication.
How does a team fail over to an EFS replica and preserve its new writes during failback?
Delete the replication configuration to make the replica writable, then direct the application to it. To preserve recovery-site writes, replicate back to the original primary before restoring the original direction.
An EFS replication destination already exists and rejects its use as a replica. Which protection should the team inspect?
Replication overwrite protection. It is enabled by default and must be disabled before using an existing destination.
After EFS failover, a team recreates the original primary-to-replica configuration without copying back recovery-site writes. What happens to those writes?
They are discarded as the replica is synchronized to match the original primary. Reverse replication first when those writes must be preserved.
A team expects immediate access to a new EFS replica with a strict 15-minute lag guarantee for every workload. Which assumptions need correction?
Data is accessible only after initial synchronization. Afterwards, the 15-minute RPO applies to most file systems; large, frequently changing sources can take longer.
An EFS IAM policy allows mounting, but writes fail. What additional permissions must the team examine?
ClientWrite for write authorization and POSIX directory and file permissions for the effective user and group. ClientMount grants read-only access.
An EFS access point names a root directory that does not exist and supplies no creation permissions. What happens?
The mount fails. Create the directory with appropriate permissions or provide access-point creation ownership and permissions.
An EFS replication configuration spans AWS accounts. Can the team rely on the EFS service-linked role?
No. It must supply an IAM role for cross-account replication, and the configuring identity needs iam:PassRole.