AWS CloudFormation
User Guide (Version )

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

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: 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 Lustre configuration for the file system being created. This value is required if FileSystemType is set to LUSTRE.

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

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: 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