Sélectionner vos préférences de cookies

Nous utilisons des cookies essentiels et des outils similaires qui sont nécessaires au fonctionnement de notre site et à la fourniture de nos services. Nous utilisons des cookies de performance pour collecter des statistiques anonymes afin de comprendre comment les clients utilisent notre site et d’apporter des améliorations. Les cookies essentiels ne peuvent pas être désactivés, mais vous pouvez cliquer sur « Personnaliser » ou « Refuser » pour refuser les cookies de performance.

Si vous êtes d’accord, AWS et les tiers approuvés utiliseront également des cookies pour fournir des fonctionnalités utiles au site, mémoriser vos préférences et afficher du contenu pertinent, y compris des publicités pertinentes. Pour accepter ou refuser tous les cookies non essentiels, cliquez sur « Accepter » ou « Refuser ». Pour effectuer des choix plus détaillés, cliquez sur « Personnaliser ».

AWS::EFS::MountTarget

Mode de mise au point

Sur cette page

AWS::EFS::MountTarget - AWS CloudFormation
Cette page n'a pas été traduite dans votre langue. Demande de traduction
Filtrer la vue

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.

Syntax

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

JSON

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

YAML

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

Properties

FileSystemId

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

Required: Yes

Type: String

Pattern: ^(arn:aws[-a-z]*:elasticfilesystem:[0-9a-z-:]+:file-system/fs-[0-9a-f]{8,40}|fs-[0-9a-f]{8,40})$

Maximum: 128

Update requires: Replacement

IpAddress

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

Required: No

Type: String

Pattern: ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$

Minimum: 7

Maximum: 15

Update requires: Replacement

SecurityGroups

VPC security group IDs, of the form sg-xxxxxxxx. These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see Amazon VPC Quotas in the Amazon VPC User Guide (see the Security Groups table).

Required: Yes

Type: Array of String

Maximum: 100

Update requires: No interruption

SubnetId

The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone.

Required: Yes

Type: String

Pattern: ^subnet-[0-9a-f]{8,40}$

Minimum: 15

Maximum: 47

Update requires: Replacement

Return values

Ref

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

{"Ref":"logical_mount_target_id"} returns

fsmt-0123456789abcdef8.

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

Fn::GetAtt

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.

Id

The ID of the Amazon EFS file system that the mount target provides access to.

Example: fs-0123456789111222a

IpAddress

The IPv4 address of the mount target.

Example: 192.0.2.0

Examples

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.

JSON

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

YAML

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

See also

Rubrique suivante :

Next

Rubrique précédente :

ReplicationDestination
ConfidentialitéConditions d'utilisation du sitePréférences de cookies
© 2025, Amazon Web Services, Inc. ou ses affiliés. Tous droits réservés.