New to Claude Skills? Learn how to install them →

Taws on GitHub

Troubleshooting S3 Files

OfficialFree

Resolve Amazon S3 Files issues efficiently.

by aws2.3k stars on aws/agent-toolkit-for-aws
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Troubleshooting S3 Files does

Troubleshooting S3 Files is a bash-based skill designed to help users diagnose and resolve common issues encountered with Amazon S3 Files. This skill is particularly useful for developers and system administrators who work with S3 file systems and need to address problems such as mount failures, permission errors, synchronization issues, and performance bottlenecks. By following a structured approach, users can quickly identify the root causes of their S3 file system problems and apply the appropriate solutions.

The skill begins by verifying that the necessary dependencies, such as the AWS CLI with the s3files subcommand, are installed and configured correctly. It then classifies issues based on symptoms, allowing users to pinpoint the category of their problem—be it client installation, network/security group configurations, IAM permissions, synchronization conflicts, or performance concerns. Each category includes specific commands and troubleshooting steps to guide users in resolving their issues.

For instance, if users encounter an access denied error, the skill will direct them to check IAM permissions and modify roles as needed. Similarly, if files are not appearing in S3, users can verify synchronization status and troubleshoot common export errors. The skill also provides insights into performance issues, such as slow reads or high latency, helping users optimize their S3 file system configurations.

Overall, this skill serves as a valuable resource for anyone managing S3 file systems, streamlining the troubleshooting process and reducing downtime by providing clear, actionable steps to resolve issues efficiently.

When to use it

Use this skill when you experience issues with your S3 file system, such as mount failures, access denied errors, or synchronization problems.

When not to use it

This skill is not suitable for users who are not working with Amazon S3 Files or those seeking general AWS troubleshooting guidance.

What you can build with it

Resolving Mount Failures

When a user cannot mount their S3 file system, they can utilize this skill to diagnose the issue and follow the recommended steps to resolve common mount failures.

Fixing Permission Errors

If a user encounters access denied errors while trying to perform file operations, this skill guides them through checking and adjusting IAM permissions.

Addressing Synchronization Problems

When files are not appearing in S3 after writes, users can use this skill to verify synchronization status and troubleshoot potential issues.

How to install Troubleshooting S3 Files

View source

1. Install with the skills CLI

npx skills add aws/agent-toolkit-for-aws/troubleshooting-s3-files --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by aws

Troubleshooting S3 Files

Overview

Diagnoses and resolves Amazon S3 Files issues: mount failures, IAM permissions, synchronization, conflict resolution, and performance.

For authoritative guidance, see S3 Files Troubleshooting.

Common Tasks

0. Verify Dependencies

  • You MUST verify aws CLI is available with s3files subcommand support
  • You MUST confirm valid AWS credentials
  • 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 steps before executing and wait for user confirmation on write commands

1. Classify the Issue

SymptomCategory
mount.s3files: command not foundA: Client Installation
Connection timed out during mountB: Network/Security Group
Mount hangs indefinitely (no timeout)B: Network/Security Group
Access denied during mountC: IAM Permissions
File system stuck in "creating"C: IAM Permissions
Permission denied on file operationsC: IAM Permissions
Files not appearing in S3 after writeD: Synchronization
Files in .s3files-lost+found directoryE: Conflict Resolution
Slow reads or high latencyF: Performance
NFS server errorG: Encryption/KMS
DNS name resolution failsH: VPC DNS

2. Category A — Client Installation

mount.s3files: command not found means amazon-efs-utils is missing or < v3.0.0.

sudo yum -y install amazon-efs-utils  # Amazon Linux

3. Category B — Network/Security Group

Connection timeout is the #1 mount failure — almost always security groups.

Verify mount target exists in the instance's AZ:

aws s3files list-mount-targets --file-system-id fs-ID --region REGION

Cross-AZ mounting works but adds latency.

Verify security groups — most common fix:

  • Mount target SG MUST have inbound TCP 2049 from compute SG
  • Compute SG MUST have outbound TCP 2049 to mount target SG
  • Fix: aws ec2 authorize-security-group-ingress --group-id sg-MT --protocol tcp --port 2049 --source-group sg-COMPUTE

Test connectivity:

nc -zv az-ID.fs-ID.s3files.REGION.on.aws 2049

Note: These SG troubleshooting steps also apply to EFS — use aws efs describe-mount-targets instead.

Mount hangs in isolated VPC: If the VPC has no internet access, S3 Files requires a CloudWatch Logs VPC endpoint (com.amazonaws.REGION.logs) for mount to complete.

4. Category C — IAM Permissions

File system stuck in "creating" status: S3 Files does NOT validate IAM role permissions at creation time. Wrong trust policy or missing permissions → stuck in creating with access denied in statusMessage.

Check status:

aws s3files get-file-system --file-system-id fs-ID --region REGION

Check statusMessage. If access denied, fix the IAM role and delete/recreate.

Mount access denied: Compute role needs s3files:ClientMount. For dev/test only, AmazonS3FilesClientFullAccess is acceptable — avoid in production.

Write permission denied: Compute role needs s3files:ClientWrite

Root access denied: Compute role needs s3files:ClientRootAccess. ⚠️ Bypasses POSIX permissions — prefer access points with scoped POSIX users.

Check file system policy:

aws s3files get-file-system-policy --file-system-id fs-ID --region REGION

5. Category D — Synchronization

Files not appearing in S3: Writes sync within ~60 seconds. Check status:

getfattr -n "user.s3files.status;$(date -u +%s)" filename --only-values

Common ExportError values:

ErrorFix
S3AccessDeniedFile system IAM role lacks S3 write permissions
S3BucketNotFoundBucket deleted or renamed
RoleAssumptionFailedTrust policy misconfigured
EncryptionKeyInaccessibleKMS key disabled or permissions revoked
PathTooLongFile path exceeds 1,024 byte S3 key limit

Monitor: PendingExports CloudWatch metric. Growing = exceeds 800 files/sec rate.

6. Category E — Conflict Resolution

Files in .s3files-lost+found-{fs-id} = sync conflict (modified via FS and S3 simultaneously). S3 wins; FS version moved to lost+found.

7. Category F — Performance

First access latency: Normal — first directory access imports metadata.

Intelligent read routing not working: Compute role needs s3:GetObject on the bucket.

Slow writes: If PendingExports growing, distribute across multiple file systems.

8. Category G — Encryption/KMS

NFS server error with encrypted FS = KMS issue. Verify key is enabled and role has KMS permissions.

9. Category H — 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

AWS CLI endpoint URL cannot be resolved

CLI is too old for S3 Files. Run aws --version — if v1.x, upgrade to AWS CLI v2: Installing the AWS CLI.

ECS task fails with DNS resolution error

Used efsVolumeConfiguration instead of s3filesVolumeConfiguration. Fix: use fileSystemArn in S3 Files-specific volume config.

S3 Files vs other products confusion

S3 Files is NOT Mountpoint for S3, S3 File Gateway, or File Cache. Uses aws s3files CLI, s3files: IAM actions, mount -t s3files.

Enable Debug Logs

Set logging_level = DEBUG in /etc/amazon/efs/s3files-utils.conf. Logs at /var/log/amazon/efs/mount.log.

Collect Logs for AWS Support

sudo tar -czf /tmp/s3files-logs.tar.gz /var/log/amazon/efs/ /etc/amazon/efs/s3files-utils.conf

Security Considerations

  • When diagnosing IAM issues, verify least-privilege — avoid FullAccess as a shortcut
  • Without a file system policy, any VPC client can mount
  • Restrict /var/log/amazon/efs/ access — logs contain S3 key names

Additional Resources

Frequently asked questions about Troubleshooting S3 Files

Similar skills