By Hyuntaek Park
Senior full-stack engineer at TWIGFARM
Amazon EFS (Elastic File System) is very useful when we need a limitless storage and/ or to share the storage with different AWS services such as lambdas, another EC2 instance, eCSS, etc. In order to start using the EFS on our EC2, we need a little bit of a mounting process.
Incurring the process is already very well https://docs.aws.amazon.com/efs/latest/ug/wt1-test.html, Let me explain in my words with a few screen shots for a better understanding.
Prerequisites
- An EFS is created
- An EC2 instance is created
SSH into the EC2 instance and run the mount command
First, ssh into the EC2 instance to run the following commands.
You can replace the EFS_DNS_NAME here and replace it with your EFS DNS name.
Now you can confirm the EFS is mounted. One thing that you need to keep in mind is that if you restart the EC2 instance, you will have to run the mounting command again.
If you need to set up your EC2 instance to mount the EFS on restarts, then refer to the following link. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
Enjoy the flexible and easy to use storage, EFS.
Thanks!