Reputation: 171
I am trying to mount AWS EFS to my local MacBook (also other local computers) However, it is not working.
My port 22 and 2049 is wide open as a testing.
I tried few command like
mount -t nfs4 -o nfservers=4.1 xxx.xxx.xxx.xxx:/ efs/
But I am keep getting a connection timed out
error.
Also I tried mounting this EFS to another AWS account EC2 instances. But keep getting same error.
For example, I have EFS in Account1 and EC2 in Account2 (Different VPC) and trying:
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 xxx.xxx.xxx.xxx:/ /efs/
It is not working unless I have my EC2 in the same account (which is account1).
Is there a way I can mount this EFS in different account or local computers?
Upvotes: 17
Views: 37767
Reputation: 653
What worked for me was to mount it to an EC2 ("on-premises"), give myself SSH access to that server, and then use sshfs
to access it.
sshfs -o allow_other,IdentityFile={YOUR_SSH_KEY} {REMOTE_USERNAME}@{YOUR_URL}:/{YOUR}/{FOLDER}/{ON_REMOTE} /{YOUR}/{LOCAL}/{FOLDER}
Upvotes: 5
Reputation: 131
sudo mount -t nfs -o vers=4,tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 -w host_ip:/ efs
I have tried using the AWS Client connect VPN i.e. P2S VPN. it worked for me as well. With the latest changes now the EFS can be connected from your local machine using AWS VPN.
To access EFS file systems from on-premises, you must have an AWS Direct Connect or AWS VPN connection between your on-premises datacenter and your Amazon VPC.
Upvotes: 2
Reputation: 663
For those who are curious, try
sudo mount -t nfs -o vers=4,tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 -w host_ip:/ efs
worked for me via direct connect.
Upvotes: 16