Interview Prep/AWS/S3, EBS and EFS

`mount -t efs` hangs, then fails with `mount.nfs4: Connection timed out`.

BeginnerTroubleshootingS3, EBS and EFS
Answer

Likely causes → The mount target's SG does not allow NFS (TCP 2049) from the client, there is no mount target in the client's AZ, or DNS resolution of the file system name is off in the VPC.

Diagnose →

aws efs describe-mount-targets --file-system-id fs-0abc --query 'MountTargets[].[AvailabilityZoneName,IpAddress,LifeCycleState]'
aws efs describe-mount-target-security-groups --mount-target-id fsmt-0abc
nc -zv fs-0abc.efs.us-east-1.amazonaws.com 2049

Fix →

  1. Allow TCP 2049 from the client SG on the mount target SG
  2. Create a mount target in every AZ where clients run
  3. Turn on enableDnsSupport and enableDnsHostnames on the VPC

Prevent → Create mount targets for every AZ in IaC, and use amazon-efs-utils with _netdev,tls in fstab.

aws All AWS questions Roadmap: AWS core services

More on S3, EBS and EFS