Amazon Elastic File System Operations
Jump to navigation
Jump to search
Internal
Get Information
List and Describe Available EFS File Systems
aws efs describe-file-systems
Describe just one file system:
aws efs describe-file-systems --file-system-id fs-99999999
List Mount Targets
aws efs describe-mount-targets --file-system-id fs-33333333
Create a File System
From Console
AWS Console in the correct region → EFS → Create file System.
Name: playground-efs
VPC: An EFS file system can only have mount targets in one VPC at a time.
Customize.
Do not enable encryption.
Mount targets. It seems there could be just one mount target per availability zone.
Subnet IDs
Security Groups. If the request provides SecurityGroups, the mount target's network interface is associated with those security groups. Otherwise, it belongs to the default security group for the subnet's VPC.
With CLI
Mount an EFS File System on an EC2 Instance
Using the EFS Mount Helper
This approach requires the presence of the EFS mount helper.
Install 'amazon-efs-utils' package:
sudo yum install -y amazon-efs-utils
More details:
Mount the file system:
sudo mount -t efs -o tls fs-99999999:/ /mnt/efs
More details:
Using the NFS Client
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-99999999.efs.us-west-2.amazonaws.com:/ /mnt/efs
Delete a File System
Delete a Mount Target
First all mount targets need to be deleted:
aws efs delete-mount-target --mount-target-id fsmt-11111111
Delete the File System
aws efs delete-file-system --file-system-id fs-33333333