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

Type of file system. Currently the only supported type is WINDOWS.

Required: No

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.

Required: No

Type: String

Update requires: Replacement

LustreConfiguration

The configuration object for Lustre file systems used in the CreateFileSystem operation.

Required: No

Type: LustreConfiguration

Update requires: No interruption

SecurityGroupIds

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

Required: No

Type: List of String

Maximum: 50

Update requires: Replacement

StorageCapacity

The storage capacity of the file system.

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 IDs of the subnets 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: No

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.

Required: No

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": [ null ], "SecurityGroupIds": [ null ], "Tags": [ { "Key": "Name", "Value": "s3linkedLustre" }, { "Key": "StorageCapacity", "Value": "3600GB" } ], "LustreConfiguration": { "ImportPath": null, "ExportPath": null, "WeeklyMaintenanceStartTime": "2:20:30" } } } }, "Outputs": { "FileSystemId": { "Value": { "Ref": "BasicS3LinkedLustreFileSystem" } } } }

YAML

Resources: BasicS3LinkedLustreFileSystem: Type: AWS::FSx::FileSystem Properties: FileSystemType: "LUSTRE" StorageCapacity: 3600 SubnetIds: [!ImportValue CustomerPublicSubnet01] SecurityGroupIds: [!ImportValue LustreIngressSecurityGroupId] Tags: - Key: "Name" Value: "s3linkedLustre" - Key: "StorageCapacity" Value: "3600GB" LustreConfiguration: ImportPath: !Join ["", ["s3://", !ImportValue LustreCFNTestS3ImportBucketName]] ExportPath: !Join ["", ["s3://", !ImportValue LustreCFNTestS3ImportBucketName]] WeeklyMaintenanceStartTime: "2:20:30" Outputs: FileSystemId: Value: !Ref BasicS3LinkedLustreFileSystem

Create an Amazon FSx for Windows File Server File System

The following examples create an Amazon FSx for Windows File Server file system.

JSON

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

YAML

Resources: WindowsFileSystemWithAllConfigs: Type: "AWS::FSx::FileSystem" Properties: FileSystemType: "WINDOWS" StorageCapacity: 300 SubnetIds: [!ImportValue CustomerPublicSubnet01] SecurityGroupIds: [!ImportValue LustreIngressSecurityGroupId] Tags: - Key: "Name" Value: "windows" - Key: "ThroughputCapacity" Value: "16" WindowsConfiguration: ActiveDirectoryId: !ImportValue CustomerDirectoryServiceId ThroughputCapacity: 8 WeeklyMaintenanceStartTime: "4:16:30" DailyAutomaticBackupStartTime: "01:00" AutomaticBackupRetentionDays: 2 CopyTagsToBackups: false Outputs: FileSystemId: Value: !Ref WindowsFileSystemWithAllConfigs