First time using EFS--missing something-detailed steps shown


Hello, I did these steps:
##2) Spin up 2 Linux instances
#Login console
#Launch, Select Amazon Linux 2 AMI,
#select t2,micro
#Number of instances 2
#Accept VPC default
#Configure new Security Group with rules opening (SSH, NFS, all TCP)
#Launch, download pemFile
#chmod 400 pemFile
ssh -i pemFile ec2-user@IPv4PublicIP
sudo yum update
##3) Set up password-less SSH between the two instances
ssh-keygen -N ""
copy ~/.ssh/ to ~/.ssh/authorized_keys of lead and slave nodes
#Note: ssh-copy-id $dest does not work as on Debian for previous step

My two instances are:


#Note: Package 1:nfs-utils-1.3.0-0.54.amzn2.0.2.x86_64 already installed and latest version
sudo yum install -y amazon-efs-utils

I can see maybe a problem here because when I setup EFS with Network, I only see:
us-east-1a,b,c,d,e, no us-east-2 entries
and vpc-74b84809
Availability zone us-east-1a
Then, the Attach page gives me:
[ec2-user@ip-172-31-29-158 ~]$ sudo mount -t efs -o tls fs-03a16a81:/ efs
Failed to resolve "" - check that your file system ID is correct.
See for more detail.
[ec2-user@ip-172-31-29-158 ~]$ sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport efs
mount.nfs4: Failed to resolve server Name or service not known
mount.nfs4: Operation already in progress
[ec2-user@ip-172-31-29-158 ~]$ sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport efs
mount.nfs4: Connection timed out
[ec2-user@ip-172-31-29-158 ~]$

What am I missing or doing wrong?

Edited by: oschreiber on Aug 18, 2020 1:16 PM

asked 4 years ago1227 views
3 Answers

Sounds like your EFS is in a different region than your EC2 instances...which would make for a more difficult connection from your EC2 instances.

I would create the EFS in the same region as EC2. Then make sure that security group access between the EFS security group and the EC2 security group there (usually that part is my problem area when I can not mount).

Some details here on security groups...

answered 4 years ago

Thanks, I did find eventually the way to get the same region for EFS as instance.
So now I am studying your suggestions on security group.

answered 4 years ago

Thank you so very much. That page was evoking how to set the security groups of instances and EFS and another page showed how to edit that into the VPC's.
Not evident to me but I am glad EFS mounted on the two nodes, now.

answered 4 years 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