Amazon Elastic File System Operations: Difference between revisions
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
{{External|https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html}} | {{External|https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html}} | ||
==From Console== | ==From Console== | ||
AWS Console in the correct region → EFS → Create file System. | |||
Name: playground-efs | |||
VPC: An EFS file system can only have [[Amazon_Elastic_File_System_Concepts#Mount_Target|mount targets]] in one VPC at a time. | |||
==With CLI== | ==With CLI== | ||
Revision as of 17:58, 5 September 2020
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.
With CLI
Mount an EFS File System on an EC2 Instance
Install 'amazon-efs-utils' package:
sudo yum install -y amazon-efs-utils
More details:
Mount the file system:
sudo mount -t efs fs-12345678:/ /mnt/efs
More details:
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