Changing the VPC for your mount target - Amazon Elastic File System
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Changing the VPC for your mount target

You can use an Amazon EFS file system in one VPC based on the Amazon VPC service at a time. That is, you create mount targets in a VPC for your file system, and use those mount targets to provide access to the file system.

You can mount the Amazon EFS file system from these targets:

  • Amazon EC2 instances in the same VPC

  • EC2 instances in a VPC connected by VPC peering

  • On-premises servers by using Amazon Direct Connect

  • On-premises servers over an Amazon virtual private network (VPN) by using Amazon VPC

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them. The connection can use private Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6) addresses. For more information on how Amazon EFS works with VPC peering, see Mounting EFS file systems from another Amazon Web Services account or VPC.

To access the file system from EC2 instances in another VPC, you have to:

  • Delete the current mount targets.

  • Change the VPC.

  • Create new mount targets.

For more information on performing these steps in the Amazon Web Services Management Console, see To change the VPC for an Amazon EFS file system (console).

Using the CLI

To use a file system in another VPC, first delete any mount targets that you previously created in a VPC. Then create new mount targets in another VPC. For example Amazon CLI commands, see Manage mount targets (CLI).