aws-cdk-lib.aws_fsx.LustreFileSystem

class LustreFileSystem (construct)

LanguageType name
.NETAmazon.CDK.AWS.FSx.LustreFileSystem
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsfsx#LustreFileSystem
Javasoftware.amazon.awscdk.services.fsx.LustreFileSystem
Pythonaws_cdk.aws_fsx.LustreFileSystem
TypeScript (source)aws-cdk-lib » aws_fsx » LustreFileSystem

Implements IConstruct, IDependable, IResource, IFileSystem, IConnectable

The FSx for Lustre File System implementation of IFileSystem.

See also: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html

Example

import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const vpc: ec2.Vpc;
declare const bucket: s3.Bucket;

const lustreConfiguration = {
  deploymentType: fsx.LustreDeploymentType.SCRATCH_2,
  exportPath: bucket.s3UrlForObject(),
  importPath: bucket.s3UrlForObject(),
  autoImportPolicy: fsx.LustreAutoImportPolicy.NEW_CHANGED_DELETED,
};

const fs = new fsx.LustreFileSystem(this, "FsxLustreFileSystem", {
  vpc: vpc,
  vpcSubnet: vpc.privateSubnets[0],
  storageCapacityGiB: 1200,
  lustreConfiguration,
});

Initializer

new LustreFileSystem(scope: Construct, id: string, props: LustreFileSystemProps)

Parameters

  • scope Construct
  • id string
  • props LustreFileSystemProps

Construct Props

NameTypeDescription
lustreConfigurationLustreConfigurationAdditional configuration for FSx specific to Lustre.
storageCapacityGiBnumberThe storage capacity of the file system being created.
vpcIVpcThe VPC to launch the file system in.
vpcSubnetISubnetThe subnet that the file system will be accessible from.
backupId?stringThe ID of the backup.
kmsKey?IKeyThe KMS key used for encryption to protect your data at rest.
removalPolicy?RemovalPolicyPolicy to apply when the file system is removed from the stack.
securityGroup?ISecurityGroupSecurity Group to assign to this file system.

lustreConfiguration

Type: LustreConfiguration

Additional configuration for FSx specific to Lustre.


storageCapacityGiB

Type: number

The storage capacity of the file system being created.

For Windows file systems, valid values are 32 GiB to 65,536 GiB. For SCRATCH_1 deployment types, valid values are 1,200, 2,400, 3,600, then continuing in increments of 3,600 GiB. For SCRATCH_2 and PERSISTENT_1 types, valid values are 1,200, 2,400, then continuing in increments of 2,400 GiB.


vpc

Type: IVpc

The VPC to launch the file system in.


vpcSubnet

Type: ISubnet

The subnet that the file system will be accessible from.


backupId?

Type: string (optional, default: no backup will be used.)

The ID of the backup.

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


kmsKey?

Type: IKey (optional, default: the aws/fsx default KMS key for the AWS account being deployed into.)

The KMS key used for encryption to protect your data at rest.


removalPolicy?

Type: RemovalPolicy (optional, default: RemovalPolicy.RETAIN)

Policy to apply when the file system is removed from the stack.


securityGroup?

Type: ISecurityGroup (optional, default: creates new security group which allows all outbound traffic.)

Security Group to assign to this file system.

Properties

NameTypeDescription
connectionsConnectionsThe security groups/rules used to allow network connections to the file system.
dnsNamestringThe DNS name assigned to this file system.
envResourceEnvironmentThe environment this resource belongs to.
fileSystemIdstringThe ID that AWS assigns to the file system.
mountNamestringThe mount name of the file system, generated by FSx.
nodeNodeThe tree node.
stackStackThe stack in which this resource is defined.

connections

Type: Connections

The security groups/rules used to allow network connections to the file system.


dnsName

Type: string

The DNS name assigned to this file system.


env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


fileSystemId

Type: string

The ID that AWS assigns to the file system.


mountName

Type: string

The mount name of the file system, generated by FSx.


node

Type: Node

The tree node.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
toString()Returns a string representation of this construct.
static fromLustreFileSystemAttributes(scope, id, attrs)Import an existing FSx for Lustre file system from the given properties.

applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromLustreFileSystemAttributes(scope, id, attrs)

public static fromLustreFileSystemAttributes(scope: Construct, id: string, attrs: FileSystemAttributes): IFileSystem

Parameters

  • scope Construct
  • id string
  • attrs FileSystemAttributes

Returns

  • IFileSystem

Import an existing FSx for Lustre file system from the given properties.