I need to replace an EFS with an encrypted one. The plan is to copy all of its contents to S3, populate the new EFS with the S3 contents, and then unmount the old EFS and mount the new EFS in the same location.
The problem is, I do not know how to find all the EC2 instances that are mounted to that particular EFS. I've looked through the aws efs
documentation and nothing looks like it does what I want.
There is no single place or command that lists the ec2 instances mounting an EFS.
The next best thing I would suggest to do is use to use Cloudwatch dashboard with an EFS metric. There is one metric that shows you the number of EC2 instances that are connected to your EFS share: It is the Sum
statistic of the ClientConnections
metric under EFS.
You can create a Cloudwatch dashboard easily -
The graph will be the number of connections to that. As you move EC2s off that non encrypted drive, this number should go down.
The final dashboard will look something like: