AWS::FSx::FileSystem - AWS CloudFormation

AWS::FSx::FileSystem

The AWS::FSx::FileSystem resource is an Amazon FSx resource type that creates either an Amazon FSx for Windows File Server file system or an Amazon FSx for Lustre file system.

Syntax

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

JSON

{ "Type" : "AWS::FSx::FileSystem", "Properties" : { "BackupId" : String, "FileSystemType" : String, "KmsKeyId" : String, "LustreConfiguration" : LustreConfiguration, "SecurityGroupIds" : [ String, ... ], "StorageCapacity" : Integer, "StorageType" : String, "SubnetIds" : [ String, ... ], "Tags" : [ Tag, ... ], "WindowsConfiguration" : WindowsConfiguration } }

YAML

Type: AWS::FSx::FileSystem Properties: BackupId: String FileSystemType: String KmsKeyId: String LustreConfiguration: LustreConfiguration SecurityGroupIds: - String StorageCapacity: Integer StorageType: String SubnetIds: - String Tags: - Tag WindowsConfiguration: WindowsConfiguration

Properties

BackupId

The ID of the backup. Specifies the backup to use if you're creating a file system from an existing backup.

Required: No

Type: String

Update requires: Replacement

FileSystemType

The type of Amazon FSx file system, either LUSTRE or WINDOWS.

Required: Yes

Type: String

Allowed values: LUSTRE | WINDOWS

Update requires: Replacement

KmsKeyId

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for Amazon FSx for Windows File Server file systems and persistent Amazon FSx for Lustre file systems at rest. In either case, if not specified, the Amazon FSx managed key is used. The scratch Amazon FSx for Lustre file systems are always encrypted at rest using Amazon FSx managed keys. For more information, see Encrypt in the AWS Key Management Service API Reference.

Required: No

Type: String

Update requires: Replacement

LustreConfiguration

The Lustre configuration for the file system being created.

Required: No

Type: LustreConfiguration

Update requires: No interruption

SecurityGroupIds

A list of IDs specifying the security groups to apply to all network interfaces created for file system access. This list isn't returned in later requests to describe the file system.

Required: No

Type: List of String

Maximum: 50

Update requires: Replacement

StorageCapacity

Sets the storage capacity of the file system that you're creating.

For Lustre file systems:

  • For SCRATCH_2 and PERSISTENT_1 SSD deployment types, valid values are 1200 GiB, 2400 GiB, and increments of 2400 GiB.

  • For PERSISTENT HDD file systems, valid values are increments of 6000 GiB for 12 MB/s/TiB file systems and increments of 1800 GiB for 40 MB/s/TiB file systems.

  • For SCRATCH_1 deployment type, valid values are 1200 GiB, 2400 GiB, and increments of 3600 GiB.

For Windows file systems:

  • If StorageType=SSD, valid values are 32 GiB - 65,536 GiB (64 TiB).

  • If StorageType=HDD, valid values are 2000 GiB - 65,536 GiB (64 TiB).

Required: No

Type: Integer

Minimum: 0

Maximum: 2147483647

Update requires: No interruption

StorageType

Sets the storage type for the file system you're creating. Valid values are SSD and HDD.

  • Set to SSD to use solid state drive storage. SSD is supported on all Windows and Lustre deployment types.

  • Set to HDD to use hard disk drive storage. HDD is supported on SINGLE_AZ_2 and MULTI_AZ_1 Windows file system deployment types, and on PERSISTENT Lustre file system deployment types.

Default value is SSD. For more information, see Storage Type Options in the Amazon FSx for Windows User Guide and Multiple Storage Options in the Amazon FSx for Lustre User Guide.

Required: No

Type: String

Allowed values: HDD | SSD

Update requires: Replacement

SubnetIds

Specifies the IDs of the subnets that the file system will be accessible from. For Windows MULTI_AZ_1 file system deployment types, provide exactly two subnet IDs, one for the preferred file server and one for the standby file server. You specify one of these subnets as the preferred subnet using the WindowsConfiguration > PreferredSubnetID property.

For Windows SINGLE_AZ_1 and SINGLE_AZ_2 file system deployment types and Lustre file systems, provide exactly one subnet ID. The file server is launched in that subnet's Availability Zone.

Required: Yes

Type: List of String

Maximum: 50

Update requires: Replacement

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag.

Required: No

Type: List of Tag

Maximum: 50

Update requires: No interruption

WindowsConfiguration

The configuration object for the Microsoft Windows file system you are creating. This value is required if FileSystemType is set to WINDOWS.

Required: Conditional

Type: WindowsConfiguration

Update requires: No interruption

Return values

Ref

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

{"Ref":"fs-01234567890123456"}

For the Amazon FSx file system fs-01234567890123456, Ref returns the file system ID.

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.

LustreMountName

Use the LustreMountName value when mounting an Amazon FSx for Lustre file system. For SCRATCH_1 deployment types, this value is always "fsx". For SCRATCH_2 and PERSISTENT_1 deployment types, this value is a string that is unique within an AWS Region. For more information, see Mounting from an Amazon EC2 Instance.

Examples

Create an Amazon FSx for Lustre File System

The following examples create a 1.2 TiB persistent Amazon FSx for Lustre file system, with a PerUnitStorageThroughput of 200 MB/s/TiB.

JSON

{ "Resources": { "BasicS3LinkedLustreFileSystem": { "Type": "AWS::FSx::FileSystem", "Properties": { "FileSystemType": "LUSTRE", "StorageCapacity": 1200, "SubnetIds": [ { "Fn::ImportValue": "MySubnet01" } ], "SecurityGroupIds": [ { "Fn::ImportValue": "LustreIngressSecurityGroupId" } ], "Tags": [ { "Key": "Name", "Value": "CFNs3linkedLustre" } ], "LustreConfiguration": { "AutoImportPolicy" : "NEW", "CopyTagsToBackups" : true, "DeploymentType": "PERSISTENT_1", "PerUnitStorageThroughput": 200, "ImportPath": { "Fn::Join": [ "", [ "s3://", { "Fn::ImportValue": "LustreCFNS3ImportBucketName" } ] ] }, "ExportPath": { "Fn::Join": [ "", [ "s3://", { "Fn::ImportValue": "LustreCFNS3ExportPath" } ] ] }, "WeeklyMaintenanceStartTime": "2:20:30" } } } }, "Outputs": { "FileSystemId": { "Value": { "Ref": "BasicS3LinkedLustreFileSystem" } } } }

YAML

Resources: BasicS3LinkedLustreFileSystem: Type: AWS::FSx::FileSystem Properties: FileSystemType: "LUSTRE" StorageCapacity: 1200 SubnetIds: [!ImportValue MySubnet01] SecurityGroupIds: [!ImportValue LustreIngressSecurityGroupId] Tags: - Key: "Name" Value: "CFNs3linkedLustre" LustreConfiguration: AutoImportPolicy: "NEW" CopyTagsToBackups: true DeploymentType: "PERSISTENT_1" PerUnitStorageThroughput: 200 ImportPath: !Join ["", ["s3://", !ImportValue LustreCFNS3ImportBucketName]] ExportPath: !Join ["", ["s3://", !ImportValue LustreCFNS3ExportPath]] WeeklyMaintenanceStartTime: "2:20:30" Outputs: FileSystemId: Value: !Ref BasicS3LinkedLustreFileSystem

Create an Amazon FSx for Windows File Server File System in a Self-managed Active Directory

The following examples create a Multi-AZ Amazon FSx for Windows File Server file system joined to a Self-managed active directory.

JSON

{ "Resources": { "WindowsSelfManagedADFileSystemWithAllConfigs": { "Type": "AWS::FSx::FileSystem", "Properties": { "FileSystemType": "WINDOWS", "StorageCapacity": 32, "StorageType": "SSD", "SubnetIds": [ { "Fn::ImportValue": "MySubnet01" }, { "Fn::ImportValue": "MySubnet02" } ], "SecurityGroupIds": [ { "Fn::ImportValue": "WindowsIngressSecurityGroupId" } ], "Tags": [ { "Key": "Name", "Value": "windows" } ], "WindowsConfiguration": { "ThroughputCapacity": 8, "WeeklyMaintenanceStartTime": "4:16:30", "DailyAutomaticBackupStartTime": "01:00", "AutomaticBackupRetentionDays": 30, "CopyTagsToBackups": false, "DeploymentType": "MULTI_AZ_1", "PreferredSubnetId": { "Fn:ImportValue": "MySubnet01" }, "SelfManagedActiveDirectoryConfiguration": { "DnsIps": [ { "Fn::Select": [ 0, { "Fn::Split": [ ",", { "Fn::ImportValue": "MySelfManagedADDnsIpAddresses" } ] } ] } ], "DomainName": { "Fn::ImportValue": "SelfManagedADDomainName" }, "FileSystemAdministratorsGroup": "MyDomainAdminGroup", "OrganizationalUnitDistinguishedName": "OU=FileSystems,DC=corp,DC=example,DC=com", "UserName": "Admin", "Password": { "Fn::Join": [ ":", [ "{{resolve:secretsmanager", { "Fn::ImportValue": "MySelfManagedADCredentialName" }, "SecretString}}" ] ] } } } } } }, "Outputs": { "FileSystemId": { "Value": { "Ref": "WindowsSelfManagedADFileSystemWithAllConfigs" } } } }

YAML

Resources: WindowsSelfManagedADFileSystemWithAllConfigs: Type: 'AWS::FSx::FileSystem' Properties: FileSystemType: WINDOWS StorageCapacity: 32 StorageType: SSD SubnetIds: - !ImportValue MySubnet01 - !ImportValue MySubnet02 SecurityGroupIds: - !ImportValue WindowsIngressSecurityGroupId Tags: - Key: Name Value: windows WindowsConfiguration: ThroughputCapacity: 8 WeeklyMaintenanceStartTime: '4:16:30' DailyAutomaticBackupStartTime: '01:00' AutomaticBackupRetentionDays: 30 CopyTagsToBackups: false DeploymentType: MULTI_AZ_1 PreferredSubnetId: !ImportValue MySubnet01 SelfManagedActiveDirectoryConfiguration: DnsIps: - !Select - 0 - !Split - ',' - !ImportValue MySelfManagedADDnsIpAddresses DomainName: 'Fn::ImportValue': SelfManagedADDomainName FileSystemAdministratorsGroup: MyDomainAdminGroup OrganizationalUnitDistinguishedName: 'OU=FileSystems,DC=corp,DC=example,DC=com' UserName: Admin Password: !Join - ':' - - '{{resolve:secretsmanager' - !ImportValue MySelfManagedADCredentialName - 'SecretString}}' Outputs: FileSystemId: Value: !Ref WindowsSelfManagedADFileSystemWithAllConfigs

Create an Amazon FSx for Windows File Server File System in an AWS Managed Active Directory

The following examples create a Multi-AZ Amazon FSx for Windows File Server file system using HDD storage that is joined to an AWS Managed Active Directory.

JSON

{ "Resources": { "WindowsMadFileSystemWithAllConfigs": { "Type": "AWS::FSx::FileSystem", "Properties": { "FileSystemType": "WINDOWS", "StorageCapacity": 2000, "StorageType": "HDD", "SubnetIds": [ { "Fn::ImportValue": "CfnFsxMadSubnet01" }, { "Fn::ImportValue": "CfnFsxMadSubnet02" } ], "SecurityGroupIds": [ { "Fn::ImportValue": "WindowsIngressSecurityGroupId" } ], "Tags": [ { "Key": "Name", "Value": "windows" } ], "WindowsConfiguration": { "ActiveDirectoryId": { "Fn::ImportValue": "CfnFsxMadDirectoryServiceId" }, "ThroughputCapacity": 8, "WeeklyMaintenanceStartTime": "4:16:30", "DailyAutomaticBackupStartTime": "01:00", "AutomaticBackupRetentionDays": 90, "CopyTagsToBackups": false, "DeploymentType": "MULTI_AZ_1", "PreferredSubnetId": { "Fn:ImportValue": "CfnFsxMadSubnet01" } } } } }, "Outputs": { "FileSystemId": { "Value": { "Ref": "WindowsMadFileSystemWithAllConfigs" } } } }

YAML

Resources: WindowsMadFileSystemWithAllConfigs: Type: 'AWS::FSx::FileSystem' Properties: FileSystemType: WINDOWS StorageCapacity: 2000 StorageType: SSD SubnetIds: - !ImportValue CfnFsxMadSubnet01 - !ImportValue CfnFsxMadSubnet02 SecurityGroupIds: - !ImportValue WindowsIngressSecurityGroupId Tags: - Key: Name Value: windows WindowsConfiguration: ActiveDirectoryId: !ImportValue CfnFsxMadDirectoryServiceId ThroughputCapacity: 8 WeeklyMaintenanceStartTime: '4:16:30' DailyAutomaticBackupStartTime: '01:00' AutomaticBackupRetentionDays: 90 DeploymentType: MULTI_AZ_1 PreferredSubnetId: !ImportValue CfnFsxMadSubnet01 CopyTagsToBackups: false Outputs: FileSystemId: Value: !Ref WindowsMadFileSystemWithAllConfigs