How to connect to EFS via CloudShell
A tricky topic when trying to connect to EFS is that you need to create an EC2 instance. But what if your organization is somehow bureaucratic and you need a thousand approvals just to run it locally the first time? A quick win is to use an EC2 instance and CloudShell. So, you just need to follow these steps: Create an EC2 instance with any Linux. Create a Key. Launch it. Create a Bucket in S3. Upload the Key. Open AWS Cloud Shell. Download the Key: aws s3 cp s3://MY_BUCKET/MY_KEY.pem . Give the right permissions to the Key: chmod 400 "MY_KEY.pem" Get your configuration from the **Connect **section in your EC2 instance. Connect to your EC2 instance via SSH: ssh -i "MY_KEY.pem" ec2-user@ec2MY_CONFIGURATOIN.MY_REGION.compute.amazonaws.com Install the Amazon EFS Client: sudo yum install -y amazon-efs-utils Create a folder called efs (sudo mkdir efs). Mount your EFS via the IP, which you can get from Attach button: sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport MY_IP:/ efs And that's all, now, you can mount your EFS without needing any special permissions in your local laptop. Follow me on: Personal LinkedIn YouTube Instagram Cyber Prophets Sharing Your Stories

A tricky topic when trying to connect to EFS is that you need to create an EC2 instance. But what if your organization is somehow bureaucratic and you need a thousand approvals just to run it locally the first time? A quick win is to use an EC2 instance and CloudShell. So, you just need to follow these steps:
- Create an EC2 instance with any Linux.
- Create a Key.
- Launch it.
- Create a Bucket in S3.
- Upload the Key.
- Open AWS Cloud Shell.
- Download the Key:
aws s3 cp s3://MY_BUCKET/MY_KEY.pem .
- Give the right permissions to the Key:
chmod 400 "MY_KEY.pem"
- Get your configuration from the **Connect **section in your EC2 instance.
- Connect to your EC2 instance via SSH:
ssh -i "MY_KEY.pem" ec2-user@ec2MY_CONFIGURATOIN.MY_REGION.compute.amazonaws.com
- Install the Amazon EFS Client:
sudo yum install -y amazon-efs-utils
- Create a folder called efs (
sudo mkdir efs
). - Mount your EFS via the IP, which you can get from Attach button:
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport MY_IP:/ efs
And that's all, now, you can mount your EFS without needing any special permissions in your local laptop.