aws configure set preview.efs true
aws efs describe-file-systems --profile TEST --region us-east-2
{
"FileSystems": [
{
"SizeInBytes": {
"Timestamp": 71990.0,
"Value": 614
},
"Name": "Shared-Storage-TEST",
"CreationToken": "console-ac435345",
"CreationTime": 14723446.0,
"FileSystemId": "fz-83A2",
"NumberOfMountTargets": 2,
"LifeCycleState": "available",
"OwnerId": "3423349"
}
]
}
To get only the ID:
aws efs describe-file-systems \ --profile TEST \ --region us-east-1 | \ grep FileSystemId | \ cut -f 4- -d '"' | \ cut -f -1 -d '"'
Or with jq
installed:
aws efs describe-file-systems --profile TEST --region us-east-1 | jq -r ".FileSystems[] | .FileSystemId"
sudo apt-get install nfs-common
mkdir efs-mount-point
sudo mount -t nfs4 -o vers=4.1 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).file-system-id.efs.$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}').amazonaws.com:/ ~/efs-mount-point
For example:
sudo mount -t nfs4 -o vers=4.1 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).fs-ebeb2f234242.efs.$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document|grep region|awk -F\" '{print $4}').amazonaws.com:/ ~/efs-mount-point2
I have a question here.. We used EFS to encrypt a driectory. The sd card was on a PI it was moved to another PI and all the files were there to be seen. Any reason that the /home directory should not be seen??