troubleshooting-efs
aws/agent-toolkit-for-aws
Diagnose and resolve Amazon EFS mount failures, permissions, performance, and connectivity issues.
What is troubleshooting-efs?
Troubleshooting expertise for Amazon EFS file systems covering mount failures, NFS connectivity, IAM and POSIX permissions, throughput problems, and encryption issues. Use when an EFS file system is not mounting, returning errors, performing slowly, or showing access denied.
- Classifies EFS issues into six categories: missing NFS client, network/security group, IAM/permissions, performance, encryption/KMS, and VPC DNS
- Verifies dependencies (aws CLI, amazon-efs-utils or nfs-utils) before troubleshooting
- Diagnoses and resolves security group misconfigurations blocking NFS port 2049
- Checks IAM policies and file system resource policies for access denied errors
- Analyzes throughput mode, burst credit exhaustion, and performance metrics
- Enables debug logging and collects logs for AWS Support escalation
How to install troubleshooting-efs
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill troubleshooting-efs- AWS CLI installed and configured with appropriate credentials
- Access to the EC2 instance or compute resource attempting to mount EFS
- Permissions to describe EFS, security groups, VPC, and CloudWatch metrics
How to use troubleshooting-efs
- 1.Verify aws CLI and NFS client tools (amazon-efs-utils or nfs-utils) are installed on the instance
- 2.Classify the issue by matching the symptom to one of six categories (missing client, network, IAM, performance, encryption, or DNS)
- 3.For missing NFS client: install amazon-efs-utils (preferred) or nfs-utils using package manager
- 4.For network issues: verify mount target exists in the instance's AZ, check security group rules allow TCP 2049 in both directions, test connectivity with nc command
- 5.For IAM issues: verify identity-based policy has elasticfilesystem:ClientMount permission and check file system resource policy
- 6.For performance issues: check throughput mode, monitor burst credit balance, consider switching to elastic throughput if credits exhausted
- 7.For encryption issues: verify KMS key is enabled and EFS service-linked role has KMS permissions
- 8.Enable debug logging by setting logging_level = DEBUG in /etc/amazon/efs/efs-utils.conf and review /var/log/amazon/efs/mount.log
Use cases
- Resolving 'wrong fs type' or mount command failures by installing missing NFS client tools
- Fixing connection timeouts caused by security group rules blocking TCP 2049 between compute and mount target
- Debugging 'access denied by server' errors by verifying IAM policies and file system policies
- Investigating slow EFS performance by checking throughput mode and burst credit balance
- Troubleshooting encrypted EFS failures caused by disabled KMS keys or missing service-linked role permissions
- AWS infrastructure engineers managing EFS file systems
- DevOps teams troubleshooting persistent storage connectivity issues
- System administrators diagnosing NFS mount and permission problems
- Cloud architects investigating EFS performance degradation
troubleshooting-efs FAQ
The most common cause is security group misconfiguration. Verify that TCP port 2049 is open between the compute instance's security group and the mount target's security group in both directions.
This occurs when IAM authorization is enforced via a file system policy. Check that your identity-based IAM policy includes elasticfilesystem:ClientMount permission and verify the file system resource policy allows your principal to mount.
Ensure your /etc/fstab entry includes the _netdev option, which tells the system to wait for network availability before attempting to mount the EFS file system.
First check your throughput mode with aws efs describe-file-systems. If using Bursting mode and burst credits are exhausted, switch to Elastic throughput mode. If PercentIOLimit is consistently >80%, consider switching to Max I/O performance mode (requires creating a new file system).
Run: sudo tar -czf /tmp/efs-logs.tar.gz /var/log/amazon/efs/ /etc/amazon/efs/efs-utils.conf. First enable debug logging by setting logging_level = DEBUG in /etc/amazon/efs/efs-utils.conf.
Full instructions (SKILL.md)
Source of truth, from aws/agent-toolkit-for-aws.
name: troubleshooting-efs description: > Diagnoses and resolves Amazon EFS issues including mount failures, NFS timeouts, permission errors, throughput problems, and burst credit exhaustion. Use when the user has an EFS file system that is not mounting, returning errors, performing slowly, or showing access denied. version: 1
Troubleshooting EFS
Overview
Domain expertise for diagnosing and resolving Amazon EFS issues. Covers mount failures, NFS connectivity, IAM and POSIX permissions, throughput and performance, and encryption problems.
For authoritative guidance, see EFS Troubleshooting.
Common Tasks
0. Verify Dependencies
- You MUST verify
awsCLI is available - You MUST check if
amazon-efs-utilsornfs-utilsis installed on the instance - You MUST ONLY check for tool existence and version — MUST NOT execute destructive or mutating commands during verification
- You MUST inform the user if any required tools are missing
- You MUST respect the user's decision to abort if tools are unavailable
- You SHOULD explain what each step does and why before executing it
- You SHOULD display write commands and wait for user confirmation before executing
1. Classify the Issue
| Symptom | Category |
|---|---|
| "wrong fs type" or mount command fails | A: Missing NFS Client |
| Connection timed out (hangs 2+ min) | B: Network/Security Group |
| "access denied by server" | C: IAM/Permissions |
| Slow throughput or high latency | D: Performance |
| NFS server error on encrypted FS | E: Encryption/KMS |
| DNS name resolution fails | F: VPC DNS |
2. Category A — Missing NFS Client
# Amazon Linux / RHEL / CentOS
sudo yum -y install amazon-efs-utils # preferred (includes mount helper + TLS)
# OR
sudo yum -y install nfs-utils
# Ubuntu / Debian
sudo apt-get install nfs-common
3. Category B — Network/Security Group
Connection timeout is the #1 EFS mount failure — almost always security groups.
- Verify mount target exists in the instance's AZ:
aws efs describe-mount-targets --file-system-id fs-ID --region REGION
-
Verify security groups — check BOTH directions:
- Mount target SG:
aws ec2 describe-security-groups --group-ids sg-MT— MUST have inbound TCP 2049 from compute SG - Compute SG: MUST have outbound TCP 2049 to mount target SG
- Quick fix:
aws ec2 authorize-security-group-ingress --group-id sg-MT --protocol tcp --port 2049 --source-group sg-COMPUTE
- Mount target SG:
-
Test connectivity:
nc -zv fs-ID.efs.REGION.amazonaws.com 2049
Note: These security group troubleshooting steps also apply to S3 Files. The only difference is S3 Files uses
aws s3files list-mount-targetsinstead ofaws efs describe-mount-targets.
4. Category C — IAM/Permissions
"access denied by server" with -o iam:
- Check identity-based IAM policy has
elasticfilesystem:ClientMount - Check file system resource policy:
aws efs describe-file-system-policy --file-system-id fs-ID --region REGION
Note: IAM authorization is only enforced when a file system policy exists that requires it. Without a file system policy, any client in the VPC with port 2049 access can mount — even with -o iam. To enforce IAM, you MUST create a file system policy that denies anonymous access.
POSIX permission denied (not IAM):
- Check file/directory ownership:
ls -la /mnt/efs/ - Use access points to enforce UID/GID for consistent permissions
5. Category D — Performance
Check throughput mode:
aws efs describe-file-systems --file-system-id fs-ID --region REGION --query 'FileSystems[0].ThroughputMode'
Burst credit exhaustion (Bursting mode only):
aws cloudwatch get-metric-statistics --namespace AWS/EFS --metric-name BurstCreditBalance --dimensions Name=FileSystemId,Value=fs-ID --period 3600 --statistics Average --start-time $(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%S) --end-time $(date -u +%Y-%m-%dT%H:%M:%S)
If credits near zero, switch to Elastic throughput:
aws efs update-file-system --file-system-id fs-ID --throughput-mode elastic --region REGION
General Purpose vs Max I/O:
- Check
PercentIOLimitmetric — if consistently >80%, consider Max I/O - Note: performance mode is IMMUTABLE — must create new FS and migrate
6. Category E — Encryption/KMS
NFS server error on encrypted FS = KMS key issue.
- Verify key is enabled in KMS console
- Verify EFS service-linked role has KMS permissions
- If key deleted: cancel deletion if within grace period
7. Category F — VPC DNS
DNS resolution failure = VPC DNS settings disabled.
aws ec2 describe-vpc-attribute --vpc-id vpc-ID --attribute enableDnsHostnames
aws ec2 describe-vpc-attribute --vpc-id vpc-ID --attribute enableDnsSupport
Both MUST be true. If not:
aws ec2 modify-vpc-attribute --vpc-id vpc-ID --enable-dns-hostnames Value=true
aws ec2 modify-vpc-attribute --vpc-id vpc-ID --enable-dns-support Value=true
Troubleshooting
Mount hangs then times out
Most common cause: security group. Verify TCP 2049 is open between compute and mount target.
Auto-mount fails on reboot
/etc/fstab entry MUST include _netdev option to wait for network before mounting.
"nfs not responding" after reconnect
Old kernel bug with TCP port reuse. Update kernel or add noresvport mount option.
Enable Debug Logs
Set logging_level = DEBUG in /etc/amazon/efs/efs-utils.conf. Logs at /var/log/amazon/efs/mount.log.
Collect Logs for AWS Support
sudo tar -czf /tmp/efs-logs.tar.gz /var/log/amazon/efs/ /etc/amazon/efs/efs-utils.conf
Security Considerations
- IAM authorization is only enforced when a file system policy exists — without one, any VPC client with port 2049 access can mount
- When troubleshooting access denied, verify both identity-based and resource-based policies
- Use
-o tlsfor encryption in transit — unencrypted NFS traffic is visible on the network - Restrict
/var/log/amazon/efs/access — logs may contain file system IDs and mount target IPs
Additional Resources
Related skills
More from aws/agent-toolkit-for-aws and the wider catalog.

troubleshooting-s3-files
Diagnose and resolve Amazon S3 Files mount failures, permissions, sync, and performance issues.

waf
Configure AWS WAF to filter web traffic and protect applications from exploits, bots, and fraud.

agents-build
Extend your AgentCore agent with memory, integrations, VPC, multi-agent patterns, browser tools, payments, and more.

agents-connect
Connect your agent to external APIs, tools, and services via Gateway with Cedar policy control.

marketing-mindset
Professional marketer's operating mindset for growth, positioning, and client acquisition—not tactics.

axiom-alerting
Create and manage Axiom monitors and notifiers via the v2 public API for end-to-end alerting.