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:

  1. open your Aws console and type on the search bar, EFS

  2. click on create file

  3. Enter a file name and click on customize

  4. 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]

  5. click on Next to accept all region availability

  6. check on Enforce in-transit encryption, then click on Next

  7. click on create

  8. when you successfully create, click on the ID, then click on attach

  9. Go back to your console and search on EC2 on the bar, then click and open it

  10. click on launch instance

  11. Give it a name as it’s showing above and also select Aws LINUX OS [operating system]

  12. click on the operating system drop down and select T3.Micro

  13. click on Keypair and select default value

  14. go to network and click on edit

  15. Go to security group name and change the default name to your own name, e.g EFS SG

  16. Launch your instance

  17. click on the successful ID

  18. Go to network and security and click on security group to see your ID

  19. click on default security ID

  20. click on edit inbound rule

  21. click on add rule

  22. Go to TCP Search bar and search for NFS

  23. Go to custom search bar and search for EFS SG the security group you created

  24. click on create

  25. Go to your instance

  26. click on the ID and click on connect

  27. click on connect again to open your terminal

  28. welcome to your Linux terminal

  29. Enter the following command to mound your EFS

  30. sudo + space dnf + space install + space -y + space amazon-efs-utils then enter

  31. To create directory : sudo + space mkdir + space name of your directory then enter

  32. Navigate to your instance tab and search for EFS then click

  33. open the EFS and click on attach

  34. copy the EFS mount helper [e.g sudo mount helper] and paste it on the terminal, then press enter

  35. To know if successfully mount then type: df + space -T then enter.

  36. To enter into your directory: cd + space name of your directory then enter.

  37. To create a file: sudo+ space touch + space file name then enter.