Move files using Elastic File System (EFS)
Create EFS filesystem.
Add security group rule in EFS to allow NFS from EC2.
Add security group rule in EC2 to allow NFS from EFS.
Install EFS helper on EC2
sudo yum install -y amazon-efs-utils
Create the mount point
mkdir -p /mnt/efs
Mount EFS to the EC2 instance
sudo mount -t efs -o tls <efs-filesystem-id>:/ /mnt/efs
Copy files normally to
/mnt/efs
.
caution
- Do not delete/overwrite files in the
/mnt/efs
if not created by you. - Try to archive folders directly into EFS instead of using the
cp
command. It will be faster to archive.