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, storage capacity is elastic, growing and shrinking automatically as you add and remove files.
Supports the Network File System version 4 (NFS v4.1) protocol.
Multiple Amazon EC2 instances can access an Amazon EFS file system,so applications that scale beyond a single instance can access a file system.
Amazon EC2 instances running in multiple Availability Zones(AZs) with in the same region can access the file system,so that many users can access and share a common data source.
It is also based on the pay-per-use model,which means that you only have to pay for the storage used by your file system.
Using Amazon EFS with Microsoft Windows Amazon EC2 instances is not supported.
Multiple Amazon EC2 instances can access an Amazon EFS file system at the same time, allowing Amazon EFS to provide a common data source for workloads and applications running on more than one Amazon EC2 instance.
You can mount your Amazon EFS file systems on your on-premises data center servers when connected to your Amazon VPC with AWS Direct Connect.
Steps to Create EFS:
- We can find the EFS under storage category.
- EFS is not available in all the regions as of now.Here is the supported regions.Switch to the region where you wish to create.
3. So,I switched to N.Virginia to perform the lab and selected EFS and select Create file system option.
4. Select your VPC and Subnets,if you don’t want to make this file system available to any specific subnet,Just un tick that here. Then select Next
5. If we want to add tags,we can add here and we need to select the Performance Mode.We have to select this based on EC2 instance count.
6. If we want to encrypt the data storing under EFS,we can enable the option on same page, then click on NEXT
7. Review all the options and select Create File System option,file system will be created now and available for usage.
8. Now we have to mount it to EC2 instances,for mounting we need to login to Instance and need to follow mounting instructions.To get the Instructions select the Amazon EC2 mount instructions option
9. You can run the following commands on your EC2 instance.
10.Your instance must be member of the Default Security group for successful EFS mounting.
11. Here am launching Linux EC2 instance,as windows not supportable and executing the commands given in Mount Instructions.
12. In above image,I’ve elevated my privileges to root and tried to install the required nfs-utils, but It’ll installed by default in Amazon Linux Instances.
Created a directory named efs with“sudo mkdir efs”command.
And executed the mounting command to the created directory,now what ever the files I created under“efs”is going to available for all EC2 instances.
If you want to test this,perform the same steps in another EC2 instance and test it.
13. If you want to delete the EFS,Select the EFS and go to“Actions”and“Delete File System”.
14. Enter the file system’s ID in the box and select the“Delete File System”button,File system will delete now.
More Information :https://www.fgrade.com/aws/