AWS CloudFormation
User Guide (Version )


The AWS::EFS::MountTarget resource is an Amazon EFS resource that creates a mount target for an EFS file system. You can then mount the file system on Amazon EC2 instances or other resources by using the mount target.


To declare this entity in your AWS CloudFormation template, use the following syntax:


{ "Type" : "AWS::EFS::MountTarget", "Properties" : { "FileSystemId" : String, "IpAddress" : String, "SecurityGroups" : [ String, ... ], "SubnetId" : String } }


Type: AWS::EFS::MountTarget Properties: FileSystemId: String IpAddress: String SecurityGroups: - String SubnetId: String



The ID of the file system for which to create the mount target.

Required: Yes

Type: String

Update requires: Replacement


Valid IPv4 address within the address range of the specified subnet.

Required: No

Type: String

Update requires: Replacement


Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be for the same VPC as subnet specified.

Required: Yes

Type: List of String

Maximum: 5

Update requires: No interruption


The ID of the subnet to add the mount target in.

Required: Yes

Type: String

Update requires: Replacement

Return Values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource ID. For example:


For the Amazon EFS file system mount target fsmt-12345678, Ref returns the mount target ID.

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.


The IPv4 address of the mount target.


Declare a Mount Target for an EFS File System

The following example declares a mount target that is associated with a file system, subnet, and security group, which are all declared in the same template. EC2 instances that are in the same Availability Zone (AZ) as the mount target can use the mount target to connect to the associated file system. For information about mounting file systems on EC2 instances, see Mounting File Systems in the EFS User Guide.


"MountTarget": { "Type": "AWS::EFS::MountTarget", "Properties": { "FileSystemId": { "Ref": "FileSystem" }, "SubnetId": { "Ref": "Subnet" }, "SecurityGroups": [ { "Ref": "MountTargetSecurityGroup" } ] } }


MountTarget: Type: AWS::EFS::MountTarget Properties: FileSystemId: Ref: "FileSystem" SubnetId: Ref: "Subnet" SecurityGroups: - Ref: "MountTargetSecurityGroup"

See Also