Join our Newsletter — 33% off our NHI Course
Home› Guides› Amazon EFS and FSx Security Guide: File System…
Guide Cloud Security

Amazon EFS and FSx Security Guide: File System Policies, Encryption and Access Points

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 19 November 2026 14 min read
On this page

Amazon EFS and Amazon FSx file systems are only as private as their network path, their resource policy and their identity configuration, and the EFS default policy grants full access to any client that can reach a mount target. Shared file storage on AWS is used by containers, Lambda functions, analytics clusters and Windows workloads, which means the clients are mostly non-human identities: task roles, instance profiles and service accounts. Securing EFS and FSx is therefore largely about deciding which workload identities may mount, write and act as root, then making the network and encryption settings enforce that decision.

This guide covers Amazon EFS file system policies and IAM authorisation for NFS clients, EFS access points, encryption at rest and in transit for EFS, SMB encryption for Amazon FSx for Windows File Server, encryption at rest for Amazon FSx for Lustre, network controls, logging and the common misconfigurations. The equivalent Azure service is covered in our Azure Files Security guide.

This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.

Key takeaways

  • With no file system policy in place, EFS uses a default policy that does not use IAM and grants full access to any anonymous client that can connect through a mount target. Every production file system should have an explicit policy.
  • EFS evaluates the file system policy and identity policies together, and an allow in either one is enough. A broad identity policy can grant access the file system policy never intended.
  • Three client actions control NFS access: ClientMount (read-only), ClientWrite and ClientRootAccess. Grant root access rarely.
  • Require TLS with aws:SecureTransport and require access points with elasticfilesystem:AccessPointArn so that each workload sees only its own directory as its own POSIX user.
  • EFS encryption at rest cannot be changed after creation. The console enables it by default, but the CLI, API and SDKs do not, so enforce it with elasticfilesystem:Encrypted in policies or SCPs.
  • For FSx for Windows File Server, enforce SMB encryption server-wide with Set-FSxSmbServerConfiguration -EncryptData $True -RejectUnencryptedAccess $True where every client supports SMB 3.0.

How access control works for Amazon EFS

Access to an EFS file system has three layers, and all of them matter.

  1. Network. Clients connect to mount targets in a VPC. Security groups apply at the mount target level, not at the access point level, so a client that can reach a mount target can attempt to mount any access point on that file system.
  2. IAM. NFS clients can identify themselves with an IAM role. When a client connects, EFS evaluates the file system policy (a resource policy) together with any identity-based policies attached to the client's role. AWS documents that permission does not need to be granted in both: an allow in either is sufficient.
  3. POSIX. Once mounted, ordinary file permissions apply to the user and group IDs presented by the client, or to the identity that an access point enforces.

The client actions that IAM controls are:

ActionWhat it allows
elasticfilesystem:ClientMountRead-only access to the file system
elasticfilesystem:ClientWriteWrite permissions on the file system
elasticfilesystem:ClientRootAccessUse of the root user when accessing the file system

To use IAM authorisation, clients must mount with the EFS mount helper. Client connections and IAM authorisation decisions are logged to AWS CloudTrail, which gives you an audit trail of which workload role mounted which file system.

File system policies: replacing the default

AWS documents that whenever a user-configured file system policy is not in effect, including at creation, EFS applies a default policy that does not use IAM to authenticate and grants full access to any anonymous client that can connect using a mount target. While that default is in effect, DescribeFileSystemPolicy returns PolicyNotFound. That makes the absence of a policy easy to detect: query every file system and flag any that return PolicyNotFound.

What a good policy enforces

Only a specific set of condition keys is enforced for NFS client access. AWS notes that other condition keys are not enforced, so do not rely on them in file system policies.

  • aws:SecureTransport requires clients to use TLS. Deny all client actions when it is false.
  • elasticfilesystem:AccessPointArn matches the access point the client connects through. Use it to bind each workload role to its own access point.
  • elasticfilesystem:AccessedViaMountTarget prevents access by clients that are not using file system mount targets.
  • aws:SourceIp compares the requester's IP, but AWS notes it can only be used for public IP ranges, which limits its usefulness for VPC traffic.

A sound baseline policy, as an NHI Mgmt Group recommendation, has three parts: a deny on all client actions when aws:SecureTransport is false; allows for named workload roles that grant only ClientMount or ClientMount plus ClientWrite, each conditioned on a specific AccessPointArn; and no grant of ClientRootAccess except to a named administrative role used for maintenance. Draft it, then test with a non-production client before applying, because a policy mistake will unmount or lock out running workloads.

Watch the identity side

Because an allow in an identity policy is enough, a role with elasticfilesystem:* on * can mount, write and act as root on any file system in the account whose policy does not explicitly deny it. Review workload roles for wildcard EFS actions, and use explicit denies in the file system policy for conditions that must always hold, such as TLS. Our AWS IAM Policies and Roles Guide covers how allows and denies combine, and IAM Access Analyzer Guide covers finding external and unused access.

Access points: one directory and one identity per workload

EFS access points are application-specific entry points into a file system. AWS documents that an access point enforces two things on every request made through it:

  • A POSIX user identity, including its groups, regardless of what the client presents.
  • A root directory, so clients can access only that directory and its subdirectories.

This is the main tool for multi-tenant and multi-application file systems. Without access points, any client that mounts the file system sees the whole tree and can present any user ID it likes, so a container running as root effectively bypasses POSIX permissions. With access points plus a file system policy that requires them, a compromised workload role can reach only its own directory as its own user.

Mounting through an access point uses the mount helper with the tls and accesspoint options, for example mount -t efs -o tls,iam,accesspoint=fsap-.... At least one mount target must exist in the VPC first, and access points are available in each Availability Zone where you have mount targets.

Design guidance:

  • Create one access point per application or tenant, with its own root directory and POSIX identity.
  • In the file system policy, allow each workload role only on its own AccessPointArn.
  • Give each workload its own IAM role. Sharing one task role across services defeats the binding between role and access point.
  • Never allow mounts of the file system root to application roles.

Encryption for Amazon EFS

At rest

  • Encryption at rest cannot be changed on an existing file system. To encrypt existing unencrypted data, AWS directs you to replicate the file system to a new encrypted one.
  • The console enables encryption at rest by default. With the AWS CLI, API or SDKs it must be enabled explicitly, which is how unencrypted file systems most often appear in infrastructure-as-code estates.
  • Enforce it with the elasticfilesystem:Encrypted condition key in identity policies, and across accounts with service control policies in AWS Organizations.
  • The default key is the AWS key for Amazon EFS (aws/elasticfilesystem). A customer managed KMS key gives additional control and audit capability. Data is encrypted with AES-256, and file and directory names and metadata are encrypted with a key EFS manages internally.
  • Customer managed key policies must allow CreateGrant and the EFS service principal, with a kms:ViaService condition naming the regional EFS endpoint. You control the grant and can revoke it, which stops EFS using the key for future operations.

In CloudTrail, the kms:CreateGrant call for a new file system appears as made by the identity that created it, and EFS service calls carry invokedBy set to elasticfilesystem.amazonaws.com. For key policy design, see our AWS KMS Security Guide.

In transit

AWS recommends that where policy or regulation requires encryption of data and metadata, you create a file system encrypted at rest and mount it using encryption in transit. Encryption in transit is enabled through the mount helper's tls option. Make it mandatory rather than optional by denying client actions when aws:SecureTransport is false. Otherwise a single client mounted without tls sends file data in clear text across the VPC.

Amazon FSx for Windows File Server: SMB encryption

FSx for Windows File Server serves SMB shares, and its access model is Windows: domain identities, share permissions and NTFS ACLs. The settings that most often need hardening are encryption in transit and the service accounts that join the file system to Active Directory and run applications against it.

Enforcing encryption in transit

  • Encryption in transit applies to clients that support SMB 3.0 or newer, including Windows Server 2012 and Windows 8 and later, and Linux clients with Samba client 4.2 or newer.
  • Data is encrypted with AES-128-GCM or AES-128-CCM, with GCM used when the client supports SMB 3.1.1. Integrity is provided by signing with SMB Kerberos session keys.
  • Encryption can be required for all clients or for specific shares. Server-wide encryption takes precedence, and once it is enabled it cannot be disabled for individual shares.
  • Check current settings with Get-FSxSmbServerConfiguration (look at EncryptData and RejectUnencryptedAccess).
  • Enforce server-wide with Set-FSxSmbServerConfiguration -EncryptData $True -RejectUnencryptedAccess $True. With RejectUnencryptedAccess on, clients that do not support SMB 3.0 encryption cannot access encrypted shares, so inventory legacy clients first.
  • Where server-wide enforcement is not yet possible, enable it per share for sensitive data with Set-FSxSmbShare -Name "<share>" -EncryptData $True, and plan the move to server-wide.

Identities that touch the file system

Windows file shares accumulate service accounts: backup agents, application pools, scheduled tasks and migration tools, often with broad share access and passwords that never change. Inventory the domain accounts with access to each share, prefer group managed service accounts where your directory supports them, and remove migration accounts once a migration is complete. Treat the account used to administer the file system with the same care as other privileged directory accounts.

Amazon FSx for Lustre: encryption at rest and key choice

FSx for Lustre is used for high-performance compute and machine learning training data, often fed from S3. AWS documents that encryption at rest is enabled automatically for file systems created through the console, CLI, API or SDKs, using XTS-AES-256, and is transparent to applications.

DeploymentKeyLifecycle
ScratchManaged by Amazon FSx through AWS KMS, unique per file systemDestroyed after the file system is deleted
PersistentChosen at creation: the AWS managed key for Amazon FSx (default) or a customer managed keyControlled by you
  • Only symmetric KMS keys are supported.
  • Customer managed keys let you set key policies and grants, enable annual automatic rotation, and disable or revoke access. Disabling or revoking the key affects the file system's ability to decrypt data, so put key changes under the same change control as the file system itself.
  • The required KMS permissions are kms:Decrypt, kms:GenerateDataKeyWithoutPlaintext, kms:CreateGrant and kms:DescribeKey.
  • Because scratch keys are destroyed with the file system, scratch data cannot be recovered after deletion. Do not store anything on scratch file systems that is not also held elsewhere.

Lustre file systems are frequently linked to S3 buckets. The IAM permissions involved in that link deserve the same least-privilege review as the bucket itself. See our Amazon S3 Security Guide.

Amazon FSx also offers NetApp ONTAP and OpenZFS file systems, each with its own administration model. This guide does not cover their settings; apply the same principles (explicit identity scoping, enforced encryption in transit, customer managed keys where audit matters, restricted network paths) and confirm the specific controls in AWS's documentation for each.

Network controls and exposure

  • Place mount targets and FSx network interfaces in private subnets, and restrict security groups to the specific client security groups that need NFS or SMB, not whole VPC CIDR ranges.
  • Remember that EFS security groups apply at the mount target, so network rules alone cannot separate tenants who share a file system. That separation has to come from access points and the file system policy.
  • Use elasticfilesystem:AccessedViaMountTarget to block access paths that do not go through mount targets.
  • Review VPC peering, transit gateway and VPN routes that put file storage within reach of other accounts or on-premises networks.

Logging, detection and recovery

  • Use CloudTrail to record EFS client connections and IAM authorisation decisions, and management events for policy changes on EFS and FSx. Alert on changes or deletions of file system policies, changes to SMB encryption settings and KMS key disablement or grant revocation.
  • Regularly query every EFS file system with DescribeFileSystemPolicy and report those returning PolicyNotFound.
  • Report unencrypted EFS file systems and plan replication to encrypted replacements.
  • Watch for roles mounting file systems they have not used before, and for any use of ClientRootAccess outside maintenance windows.
  • Shared file storage is a ransomware target because one compromised client can encrypt everything it can write. Keep protected backups in a separate account with restricted deletion, and test restores. Our AWS Backup Security Guide covers vault hardening.

Relevant ATT&CK techniques for threat modelling include T1530 Data from Cloud Storage and T1486 Data Encrypted for Impact.

Common failure patterns

  • No file system policy. The default policy grants full anonymous access to anything that can reach a mount target.
  • Wildcard identity policies. Roles with elasticfilesystem:* gain mount, write and root access because an identity allow is sufficient.
  • Optional TLS. Some clients mount without tls, and no policy denies them.
  • Root mounts for applications. Workloads mount the file system root instead of an access point and can read every tenant's data.
  • Shared task roles. One role used by many services, so access point binding offers no separation.
  • Unencrypted file systems from code. Infrastructure templates omit the encryption flag, and the setting cannot be fixed in place.
  • Per-share SMB encryption forgotten on new shares. Sensitive shares are added without EncryptData because server-wide enforcement was never enabled.
  • Standing service accounts on Windows shares. Migration and backup accounts keep broad access long after their purpose ends.
  • Key changes without change control. A KMS key is disabled or a grant revoked and file systems become unreadable.

Practitioner checklist

  • Attach an explicit file system policy to every EFS file system and alert on PolicyNotFound.
  • Deny all EFS client actions when aws:SecureTransport is false.
  • Create an access point per workload and condition each role's access on its AccessPointArn.
  • Grant ClientRootAccess only to a named administrative role.
  • Remove wildcard EFS actions from workload identity policies.
  • Enforce elasticfilesystem:Encrypted through SCPs and replicate any unencrypted file systems.
  • Use customer managed KMS keys where audit and revocation control matter, and put key changes under change control.
  • Enable server-wide SMB encryption and RejectUnencryptedAccess on FSx for Windows once legacy clients are gone.
  • Inventory and reduce domain service accounts with share access.
  • Restrict mount target and FSx security groups to named client security groups.
  • Keep isolated, tested backups for shared file systems.

Standards and references

Related NHI Mgmt Group resources: Azure Files Security · Amazon S3 Security Guide · AWS KMS Security Guide · AWS IAM Policies and Roles Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.