how to create amazon Elastic file system [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 also mount an Amazon EFS file system in your virtual private cloud (VPC), through the Network File System.
STEPS:
open your Aws console and type on the search bar, EFS
click on create file
Enter a file name and click on customize
Ensure you check on the box regional, check on Enable automatic back-ups, check on Enable encryption of data at rest, and accept all other default. then click on Next [note encryption data can only be done during the creation of this file]
click on Next to accept all region availability
check on Enforce in-transit encryption, then click on Next
click on create
when you successfully create, click on the ID, then click on attach
Go back to your console and search on EC2 on the bar, then click and open it
click on launch instance
Give it a name as it’s showing above and also select Aws LINUX OS [operating system]
click on the operating system drop down and select T3.Micro
click on Keypair and select default value
go to network and click on edit
Go to security group name and change the default name to your own name, e.g EFS SG
Launch your instance
click on the successful ID
Go to network and security and click on security group to see your ID
click on default security ID
click on edit inbound rule
click on add rule
Go to TCP Search bar and search for NFS
Go to custom search bar and search for EFS SG the security group you created
click on create
Go to your instance
click on the ID and click on connect
click on connect again to open your terminal
welcome to your Linux terminal
Enter the following command to mound your EFS
sudo + space dnf + space install + space -y + space amazon-efs-utils then enter
To create directory : sudo + space mkdir + space name of your directory then enter
Navigate to your instance tab and search for EFS then click
open the EFS and click on attach
copy the EFS mount helper [e.g sudo mount helper] and paste it on the terminal, then press enter
To know if successfully mount then type: df + space -T then enter.
To enter into your directory: cd + space name of your directory then enter.
To create a file: sudo+ space touch + space file name then enter.