How to Create & Configure EFS(Elastic File System) on Amazon Web Service(AWS).

Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed, elastic NFS file system for use with AWS Cloud services and on-premises resources. Amazon EFS is easy to use and offers a simple interface that allows you to create and configure file systems quickly and easily.

With Amazon EFS, you can create a file system, mount the file system on an Amazon EC2 instance, and then read and write data to and from your file system. You can mount an Amazon EFS file system in your virtual private cloud (VPC), through the Network File System versions 4.0 and 4.1 (NFSv4) protocol.


  • Login to aws portal.
  • Click on Services.


Fig 1


  • Under Storage select EFS.


Fig 2


  • Click on Create File system.


Fig. 3


  • Provide file system name.
  • Select existing Virtual private cloud(VPC).
  • Select Availability zone: regional or one zone.
  • Then click on Customize.


Fig. 4


  • Set the lifecycle(period of time) of EFS.


Fig. 5


  • If you want AWS KMS key so click on Create an AWS KMS key.
  • AWS Key Management Service (KMS) is an Amazon Web Services product that allows administrators to create, delete and control keys that encrypt data stored in AWS databases and products.
  • Provide tag name & value for EFS.
  • Click on Next.


Fig. 4


  • Select existing VPC for network.
  • Select Availablity zone, Subnet ID & Security group for mount targets.
  • Click on Next.


Fig. 5


  • If you want to set policy on File system then select policy options in json format.
  • Click on Next.


Fig. 6


  • Review all the configurations.


Fig. 7


  • Click on Create.


Fig. 8


  • After sometime EFS is ready.


Fig 10


  • Click on New EFS name then click on Attach.


Fig 11


  apt-get install nfs-common -y

  • Create a new folder.

  mkdir efs

  • Now We can attach or mount efs on a ec2 instance using two method.
  • When we select Mount via DNS.
  • Copy the commands & Run on ec2 instance using ssh.Instead of /efs provide the path on efs folder.


Fig 12


  • When we select Mount via IP.
  • Copy & paste the command on ec2 instance using ssh.


Fig 13


Create Elastic File System using Shell

aws efs create-file-system  –performance-mode generalPurpose –throughput-mode bursting  –encrypted –tags Key=Name,Value=file-system



Leave a Reply