AWS CloudFormation
User Guide (Version )

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, "SubnetIds" : [ String, ... ], "Tags" : [ Tag, ... ], "WindowsConfiguration" : WindowsConfiguration } }

YAML

Type: AWS::FSx::FileSystem Properties: BackupId: String FileSystemType: String KmsKeyId: String LustreConfiguration: LustreConfiguration SecurityGroupIds: - String StorageCapacity: Integer 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 an Amazon FSx for Windows File Server file system. Amazon FSx for Lustre does not support KMS encryption.

Required: No

Type: String

Update requires: Replacement

LustreConfiguration

The Lustre configuration for the file system being created. This value is required if FileSystemType is set to LUSTRE.

Required: Conditional

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

The storage capacity of the file system being created.

For Windows file systems, the storage capacity has a minimum of 300 GiB, and a maximum of 65,536 GiB.

For Lustre file systems, the storage capacity has a minimum of 3,600 GiB. Storage capacity is provisioned in increments of 3,600 GiB.

Required: No

Type: Integer

Minimum: 1

Update requires: Replacement

SubnetIds

The ID of the subnet to contain the endpoint for the file system. One and only one is supported. The file system is launched in the Availability Zone associated with this subnet.

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.

Examples

Create an Amazon FSx for Lustre File System

The following examples create an Amazon FSx for Lustre file system.

JSON

{ "Resources": { "BasicS3LinkedLustreFileSystem": { "Type": "AWS::FSx::FileSystem", "Properties": { "FileSystemType": "LUSTRE", "StorageCapacity": 3600, "SubnetIds": [ { "Fn::ImportValue": "MySubnet01" } ], "SecurityGroupIds": [ { "Fn::ImportValue": "LustreIngressSecurityGroupId" } ], "Tags": [ { "Key": "Name", "Value": "CFNs3linkedLustre" } ], "LustreConfiguration": { "ImportPath": { "Fn::Join": [ "", [ "s3://", { "Fn::ImportValue": "LustreCFNS3ImportBucketName" } ] ] }, "ExportPath": { "Fn::Join": [ "", [ "s3://", { "Fn::ImportValue": "LustreCFNS3ImportBucketName" } ] ] }, "WeeklyMaintenanceStartTime": "2:20:30" } } } }, "Outputs": { "FileSystemId": { "Value": { "Ref": "BasicS3LinkedLustreFileSystem" } } } }

YAML

Resources: BasicS3LinkedLustreFileSystem: Type: AWS::FSx::FileSystem Properties: FileSystemType: "LUSTRE" StorageCapacity: 3600 SubnetIds: [!ImportValue MySubnet01] SecurityGroupIds: [!ImportValue LustreIngressSecurityGroupId] Tags: - Key: "Name" Value: "CFNs3linkedLustre" LustreConfiguration: ImportPath: !Join ["", ["s3://", !ImportValue LustreCFNS3ImportBucketName]] ExportPath: !Join ["", ["s3://", !ImportValue LustreCFNS3ImportBucketName]] 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 an 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": 300, "SubnetIds": [ { "Fn::ImportValue": "MySubnet01" } ], "SecurityGroupIds": [ { "Fn::ImportValue": "WindowsIngressSecurityGroupId" } ], "Tags": [ { "Key": "Name", "Value": "windows" } ], "WindowsConfiguration": { "ThroughputCapacity": 8, "WeeklyMaintenanceStartTime": "4:16:30", "DailyAutomaticBackupStartTime": "01:00", "AutomaticBackupRetentionDays": 2, "CopyTagsToBackups": false, "SelfManagedActiveDirectoryConfiguration": { "DnsIps": [ { "Fn::Select": [ 0, { "Fn::Split": [ ",", { "Fn::ImportValue": "MySelfManagedADDnsIpAddresses" } ] } ] } ], "DomainName": { "Fn::ImprtValue": "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: 300 SubnetIds: - !ImportValue MySubnet01 SecurityGroupIds: - !ImportValue WindowsIngressSecurityGroupId Tags: - Key: Name Value: windows WindowsConfiguration: ThroughputCapacity: 8 WeeklyMaintenanceStartTime: '4:16:30' DailyAutomaticBackupStartTime: '01:00' AutomaticBackupRetentionDays: 2 CopyTagsToBackups: false SelfManagedActiveDirectoryConfiguration: DnsIps: - !Select - 0 - !Split - ',' - !ImportValue MySelfManagedADDnsIpAddresses DomainName: 'Fn::ImprtValue': 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 an Amazon FSx for Windows File Server file system joined to an AWS Managed Active Directory.

JSON

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

YAML

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