Having trouble mounting an EFS to an EC2 instance

0

I have an EFS and an EC2 instance that are both in ap-northeast-2. I've changed the region to ap-northeast-2. I've added the port 2049 tcp setting to both EFS and EC2 but the EFS won't mount when attempted using the attachment string auto-generated by aws: sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-xxxxxxxxxxxxxx.efs.ap-northeast-2.amazonaws.com:/ efs. The EFS is visible when I run aws efs describe-file-systems. I keep getting a timeout error message whenever I try to mount. Please help. Thanks!

asked 7 months ago308 views
3 Answers
2
Accepted Answer

Hello,

You have mentioned that you changed the region , hope both ec2 and efs are in same region ap-northeast-2 now. Can you ensure below things ?

  • Whether mount targets created for efs and the security group allowing port 2049 from ec2 security group , and vice versa that ec2 allowing port 2049 from efs security group.
  • Both ec2 & efs security groups having outbound rules (default 0.0.0.0/0)
  • the directory that you are trying to mount exists (example /efs)
  • Instead of DNS names of efs (fs-xxxxxxxxxxxxxx.efs.ap-northeast-2.amazonaws.com), try with ip as well.
AWS
answered 7 months ago
profile picture
EXPERT
reviewed 7 months ago
EXPERT
reviewed 7 months ago
0

Thank you!

answered 7 months ago
0

Hi You can go through this once;

Security groups not allowing access (TCP 2049). Incorrect EFS file system ID in mount command. Missing EFS utilities package (non-Amazon Linux 2). DNS resolution problems on EC2 instance.

Troubleshooting Steps: Verify security group rules for both EFS and EC2. Double-check the EFS file system ID in your mount command. Install amazon-efs-utils if needed. Test DNS resolution from EC2 to EFS DNS name. Try temporary mount with -o no_subtree_check (for diagnostics). Confirm EC2 instance has IAM permissions for EFS access. Review AWS CloudTrail and EC2 logs for errors.

Additional Resources: EFS Mounting Guide: https://docs.aws.amazon.com/efs/latest/ug/mounting-fs.html EFS Mount Helper: https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html

EXPERT
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions