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-utilsCreate the mount point
mkdir -p /mnt/efsMount EFS to the EC2 instance
sudo mount -t efs -o tls <efs-filesystem-id>:/ /mnt/efsCopy files normally to
/mnt/efs.
caution
- Do not delete/overwrite files in the
/mnt/efsif not created by you. - Try to archive folders directly into EFS instead of using the
cpcommand. It will be faster to archive.