Skip to main content
skill CX Codex

troubleshooting-efs — Claude Code skill: diagnose Amazon EFS

A skill that walks the agent through Amazon EFS failures: mount errors, NFS timeouts, access denied, slow throughput.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aws/agent-toolkit-for-aws --skill troubleshooting-efs -a claude-code
Open on GitHub

What troubleshooting-efs does

The skill sorts an EFS problem into one of six categories. The symptom picks the branch: a wrong fs type error means the NFS client is missing, a mount that hangs for two minutes or more points at networking or security groups, access denied by server means IAM or POSIX permissions, slow reads and writes mean throughput mode, an NFS server error on an encrypted file system means a KMS key, and a DNS failure means VPC settings.

Before touching anything, the skill checks that aws CLI is present and that either amazon-efs-utils or nfs-utils is installed on the instance. It only checks existence and version at that stage. Write commands are shown to you first and wait for confirmation. Each category comes with the exact calls: aws efs describe-mount-targets, security group checks in both directions on TCP 2049, the BurstCreditBalance CloudWatch metric, and aws efs describe-file-system-policy for access policies.

Some of what it flags cannot be undone. Performance mode is immutable, so moving off General Purpose or Max I/O means creating a new file system and migrating. IAM authorization only applies when a file system policy exists — without one, any client in the VPC with port 2049 access can mount, even with -o iam. If you were treating IAM as your only gate, that is worth a look.

What it helps with

  • debug a wrong fs type error when mounting EFS
  • find why a mount hangs for two minutes before timing out
  • fix access denied by server when mounting with -o iam
  • check whether burst credits ran out in Bursting mode
  • turn on VPC DNS when the file system name will not resolve

Example prompts for the agent

  • my EFS file system won't mount on the instance, help me debug it
  • the mount hangs for two minutes and times out, what should I check?
  • EFS throughput dropped, look at BurstCreditBalance

How to install troubleshooting-efs

1Skills CLI (Vercel)

npx skills add aws/agent-toolkit-for-aws --skill troubleshooting-efs -a claude-code

2Manually: put the files in place

~/.claude/skills/troubleshooting-efs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/troubleshooting-efs/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about troubleshooting-efs

How do I install troubleshooting-efs in Claude?

Run npx skills add aws/agent-toolkit-for-aws --skill troubleshooting-efs -a claude-code. The skill file lands at ~/.claude/skills/troubleshooting-efs/SKILL.md.

What does troubleshooting-efs do?

It guides the agent through Amazon EFS failures: mount errors, NFS timeouts, permission problems, throughput issues and encryption errors. The error symptom decides which branch of checks runs.

What tools does the skill need?

The aws CLI, plus amazon-efs-utils or nfs-utils on the instance. The skill verifies they exist and checks versions without running mutating commands at that step.

Source text

SKILL.md · Apache-2.0
---
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](https://docs.aws.amazon.com/efs/latest/ug/troubleshooting.html).

## Common Tasks

### 0. Verify Dependencies

- You MUST verify `aws` CLI is available
- You MUST check if `amazon-efs-utils` or `nfs-utils` is 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

```bash
# 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.

1. Verify mount target exists in the instance's AZ:

```bash
aws efs describe-mount-targets --file-system-id fs-ID --region REGION
```

1. 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`

2. Test connectivity:

```bash
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-targets` instead of `aws 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:

```bash
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:**

```bash
aws efs describe-file-systems --file-system-id fs-ID --region REGION --query 'FileSystems[0].ThroughputMode'
```

**Burst credit exhaustion (Bursting mode only):**

```bash
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:

```bash
aws efs update-file-system --file-system-id fs-ID --throughput-mode elastic --region REGION
```

**General Purpose vs Max I/O:**

- Check `PercentIOLimit` metric — 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.

```bash
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:

```bash
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

```bash
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 tls` for 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

- [EFS Troubleshooting](https://docs.aws.amazon.com/efs/latest/ug/troubleshooting.html)
- [EFS Performance](https://docs.aws.amazon.com/efs/latest/ug/performance.html)
- [EFS Mount Helper](https://docs.aws.amazon.com/efs/latest/ug/using-amazon-efs-utils.html)

© aws · Apache-2.0 · aws/agent-toolkit-for-aws

Similar skills

Everything for Cloud: AWS, Azure, GCP →

From the same set133

exporting-rds-to-s3 Walks the agent through exporting an RDS or Aurora snapshot to S3 as Parquet, from IAM roles and KMS encryption to task monitoring and data checks. CX Codex +1 6,100installs signing-in-to-aws Walks the agent through signing in to AWS from your local shell: version check, aws login once you confirm, then an identity check on the result. CX Codex +1 6,100installs connecting-vpcs-with-peering Sets up VPC peering connections between two VPCs for private network connectivity. It checks for CIDR overlap, updates route tables, and configures DNS resolution. CX Codex +1 6,100installs enabling-lambda-vpc-internet-access A skill that walks the agent through NAT Gateway, route tables and security groups when a Lambda in a private subnet cannot reach the internet. CX Codex +1 6,100installs aws-deployment Walks your coding agent through AWS CI/CD: CodePipeline, CodeBuild, CodeDeploy, CodeConnections, CodeArtifact. Useful when a pipeline stalls at source or a build hangs in a VPC. CX Codex +1 5,800installs aws-networking Routes AWS networking requests across seven services to their specialized implementation skills. It helps choose between connectivity and traffic filtering options. CX Codex +1 5,900installs aws-cleanrooms Walks your agent through AWS Clean Rooms permission failures and missing CloudWatch logs for custom ML model jobs. CX Codex +1 5,700installs aws-lambda-durable-functions Teaches coding agents to build resilient AWS Lambda functions that run up to 1 year with state persistence. Useful for long-running workflows and multi-step AI agents. CX Codex +1 5,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor