Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Creating mount targets

Focus mode
Creating mount targets - Amazon Elastic File System

To access an EFS file system in a VPC, you need to create mount targets for the file system.

For an EFS file system, the following is true:

  • You can create one mount target in each Availability Zone.

  • You can create mount targets for the file system in one VPC at a time. If you want to access the file system from another VPC,. you need to delete the mount targets from the current VPC and then create new mount targets in the other VPC. For more information, see Changing the mount target VPC.

  • If the VPC has multiple subnets in an Availability Zone, you can create a mount target in only one of those subnets. All EC2 instances in the Availability Zone can share the single mount target.

  • At a minimum, you should create a mount target in each Availability Zone from which you want to access the file system.

Note

We recommend that you create a mount target in each of the Availability Zones. There are cost considerations for mounting a file system on an EC2 instance in an Availability Zone through a mount target created in another Availability Zone. For more information, see Amazon EFS Pricing. In addition, by always using a mount target local to the instance's Availability Zone, you remove a partial failure scenario. If the mount target's zone goes down, you can't access your file system through that mount target.

You can create mount targets for a file system by using the AWS Management Console, AWS CLI, or programmatically by using the AWS SDKs. In the console, you can create mount targets when you create the file system or after the file system is created. For instructions on creating mount targets when creating a file system, see Custom using the console.

Use the following procedure to add mount targets to an existing EFS file system.

To create a mount target on an EFS file system
  1. Open the Amazon Elastic File System console at https://console.aws.amazon.com/efs/.

  2. In the left navigation pane, choose File systems, and then select the file system for which you want to change the VPC.

  3. Choose Network and then choose Manage to display the mount targets for the file system.

  4. Choose the file system that you want to add mount targets for by choosing its Name or the File system ID.

    Note

    For One Zone file systems, you can only create a single mount target that is in the same Availability Zone as the file system.

  5. To add a mount target, choose Add mount target. This option is available only for file systems that use EFS Regional storage classes, and if mount targets do not already exist in each Availability Zone for the AWS Region.

  6. For each mount target that you want to create for the file system:

    1. Choose Add mount target.

    2. Choose the Availability Zone and subnet ID for the mount target.

    3. Provide an IP address from the subnet where you are placing the mount target. If you omit a value, Amazon EFS selects an unused IP address from that subnet.

      Note

      You can't change the IP address of a mount target after it's created. To change an IP address, you need to delete the mount target and create a new one with the new address.

  7. Choose Save.

Use the following procedure to add mount targets to an existing EFS file system.

To create a mount target on an EFS file system
  1. Open the Amazon Elastic File System console at https://console.aws.amazon.com/efs/.

  2. In the left navigation pane, choose File systems, and then select the file system for which you want to change the VPC.

  3. Choose Network and then choose Manage to display the mount targets for the file system.

  4. Choose the file system that you want to add mount targets for by choosing its Name or the File system ID.

    Note

    For One Zone file systems, you can only create a single mount target that is in the same Availability Zone as the file system.

  5. To add a mount target, choose Add mount target. This option is available only for file systems that use EFS Regional storage classes, and if mount targets do not already exist in each Availability Zone for the AWS Region.

  6. For each mount target that you want to create for the file system:

    1. Choose Add mount target.

    2. Choose the Availability Zone and subnet ID for the mount target.

    3. Provide an IP address from the subnet where you are placing the mount target. If you omit a value, Amazon EFS selects an unused IP address from that subnet.

      Note

      You can't change the IP address of a mount target after it's created. To change an IP address, you need to delete the mount target and create a new one with the new address.

  7. Choose Save.

Note

For One Zone file systems, you can only create a single mount target that is in the same Availability Zone as the file system.

To create a mount target (CLI)
  • To create a mount target, use the create-mount-target CLI command (corresponding operation is CreateMountTarget), as shown following.

    $ aws efs create-mount-target \ --file-system-id file-system-id \ --subnet-id subnet-id \ --security-group ID-of-the-security-group-created-for-mount-target \ --region aws-region \ --profile adminuser

    The following example shows the command with sample data.

    $ aws efs create-mount-target \ --file-system-id fs-0123467 \ --subnet-id subnet-b3983dc4 \ --security-group sg-01234567 \ --region us-east-2 \ --profile adminuser

    After successfully creating the mount target, Amazon EFS returns the mount target description as JSON as shown in the following example.

    { "MountTargetId": "fsmt-f9a14450", "NetworkInterfaceId": "eni-3851ec4e", "FileSystemId": "fs-b6a0451f", "LifeCycleState": "available", "SubnetId": "subnet-b3983dc4", "OwnerId": "23124example", "IpAddress": "10.0.1.24" }

Note

For One Zone file systems, you can only create a single mount target that is in the same Availability Zone as the file system.

To create a mount target (CLI)
  • To create a mount target, use the create-mount-target CLI command (corresponding operation is CreateMountTarget), as shown following.

    $ aws efs create-mount-target \ --file-system-id file-system-id \ --subnet-id subnet-id \ --security-group ID-of-the-security-group-created-for-mount-target \ --region aws-region \ --profile adminuser

    The following example shows the command with sample data.

    $ aws efs create-mount-target \ --file-system-id fs-0123467 \ --subnet-id subnet-b3983dc4 \ --security-group sg-01234567 \ --region us-east-2 \ --profile adminuser

    After successfully creating the mount target, Amazon EFS returns the mount target description as JSON as shown in the following example.

    { "MountTargetId": "fsmt-f9a14450", "NetworkInterfaceId": "eni-3851ec4e", "FileSystemId": "fs-b6a0451f", "LifeCycleState": "available", "SubnetId": "subnet-b3983dc4", "OwnerId": "23124example", "IpAddress": "10.0.1.24" }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.