Home AWS HOW TO CREATE A NETWORK FILE SHARE (NFS) IN AWS?

HOW TO CREATE A NETWORK FILE SHARE (NFS) IN AWS?

by SupportPRO Admin
NFS

A Network File System is a distributed file system protocol that supports remote hosts to mount file systems through the network and interact with the file systems as though they are mounted sectionally. This allows us to connect resources to centralized servers on the network.

Amazon EFS-Elastic File System gives you a simple, scalable, and fully managed elastic NFS file system to use with AWS Cloud services and on-premises resources.

In this demonstration, we will show you how to configure a Network File System-NFS using AWS EFS and connect to an EC2 instance. 

1. Create a File System 

From the AWS EFS console, we can easily create a highly available and scalable network file system. 

  1. Login to your AWS management console and search for Elastic File System. 
  2. In the Elastic File System console, click on the button “Create file system.”
  3. Provide a name to your file system and select the VPC where you want EC2 instances to connect to your file system.
  1. Review the settings and click on the create button.

2. Deploy an EC2 instance 

In this step, we will deploy and configure an AWS EC2 instance to mount and access the file system. 

  1. Login to your AWS management console and search for EC2.
  2. On the EC2 dashboard, click on Launch Instance to install and configure a virtual machine.
  3. Provide an instance name and choose the OS image, key pair,  instance type, etc.
  1. Now review the configuration, storage, tagging, and security settings that have been selected for your instance.
  2. And click on the Launch button at the bottom of the page. 

3. Configure the security group 

Attach the VPC default security group to the EC2 instance to give EC2 instance network access to the file system.  

4. Mount the file system on the EC2 instance 

To access the file system created, we need to mount the file system using the Linux mount command and the file system DNS name. 

  1. Login to the AWS Management Console. 
  2. Go to the Elastic File System dashboard and click on the file system name you created. 
  1. Now click on the Attach button on the right top corner 
  1. Copy the DNS command from the dashboard to mount Amazon EFS file system to the EC2 instance. 

You can also use the Mount via IP option. 

  1. Now login to the EC2 instance using SSH
  2. Create a directory for the mount point

# mkdir efs

  1. And execute the DNS command copied from the dashboard to mount the EFS file system to your EC2 instance. 
  1. Here you can see the EFS file system is mounted to the directory /root/efs by executing the df -h command.

By using this method we have successfully configured Network File Share in the AWS cloud. Elastic File System in AWS acts as a centralized storage for all applications running in the AWS EC2 instances.

Partner with SupportPRO for 24/7 proactive cloud support that keeps your business secure, scalable, and ahead of the curve.

Contact Us today!
guy server checkup

Leave a Comment