Articles → AWS → EFS (Elastic File System) In AWS

EFS (Elastic File System) In AWS






Purpose





Steps




  1. Launch 2 Linux EC2 instances
  2. Create a security group for EFS
  3. Create EFS
  4. Create a folder in both EC2 instances
  5. Download and install the EFS utility for Linux
  6. Mount the EFS folder
  7. Test EFS



Launch 2 Linux EC2 Instances




Picture showing the 2 Linux EC2 instances created in AWS console
Click to Enlarge


Create A Security Group For EFS




TypeValue
TypeNFS
ProtocolTCP
Port range2049
SourceCustom
< security group of EC2 instances > 


Picture showing the new security group created for EFS
Click to Enlarge


Create EFS




Picture showing searching EFS in AWS console
Click to Enlarge



Picture showing the Create file system button for creating EFS
Click to Enlarge



Picture showing the customize button while creating the file system
Click to Enlarge



Picture showing the File system settings tab while creating EFS
Click to Enlarge



Picture showing the Lifecycle Management section of the File system settings tab while creating EFS
Click to Enlarge



Picture showing the Network Access tab while creating EFS
Click to Enlarge



Picture showing the File system policy tab while creating EFS
Click to Enlarge



Picture showing the Review and create tab while creating EFS
Click to Enlarge



Picture showing the EFS created in AWS console
Click to Enlarge


Create A Folder In Both EC2 Instances




sudo mkdir EFS





Download And Install The EFS Utility For Linux




sudo yum install -y amazon-efs-utils



Mount The EFS Folder




sudo mount -t efs fs-010314a8623bf9213 EFS/




  1. fs-010314a8623bf9213 is the File System Id
  2. EFS/ is the folder name

Test EFS




sudo touch gyan.txt




Picture showing the file created inside the EFS folder
Click to Enlarge

Picture showing the file created in first ec2 instance also displays in second ec2 instance
Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, August 17, 2022

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250