AWS CDK FSx Construct Library

raw JSON →
1.204.0 verified Mon Apr 27 auth: no python maintenance

AWS CDK L1 constructs for Amazon FSx (AWS::FSx CloudFormation resource). Version 1.204.0 is for CDK v1 (now in maintenance mode). AWS CDK v2 replaces this with the `aws-cdk-lib/aws-fsx` module. Release cadence: tied to AWS CDK releases (weekly).

pip install aws-cdk-aws-fsx
error ModuleNotFoundError: No module named 'aws_cdk.aws_fsx'
cause Missing aws-cdk-aws-fsx installation or wrong CDK version (v2 needs aws-cdk-lib).
fix
For CDK v1: pip install aws-cdk-aws-fsx. For CDK v2: install aws-cdk-lib and use 'from aws_cdk.aws_fsx import ...' (no separate package).
error AttributeError: 'CfnFileSystem' object has no attribute 'lustre_configuration'
cause CDK v1 >=1.19.0 switched to camelCase property names.
fix
Use camelCase: 'lustreConfiguration' instead of 'lustre_configuration'.
error jsii.errors.JSIIError: Expected an object, got undefined
cause Missing required property like 'subnet_ids' or 'storage_capacity' when creating CfnFileSystem.
fix
Ensure all required properties are provided. For example, for LUSTRE: file_system_type='LUSTRE', subnet_ids=[...], storage_capacity=1200.
deprecated aws-cdk-aws-fsx is part of CDK v1, which entered maintenance mode on June 1, 2022 and will end support on June 1, 2025. Use CDK v2 with aws-cdk-lib/aws-fsx instead.
fix Migrate to CDK v2: replace 'aws-cdk-aws-fsx' with 'aws-cdk-lib' and update imports to 'from aws_cdk.aws_fsx import ...'.
gotcha CDK v1 uses separate packages for each service. If you install only aws-cdk-aws-fsx, the core CDK library (aws-cdk.core) must also be installed explicitly.
fix Install both: pip install aws-cdk.core aws-cdk-aws-fsx.
breaking CDK v2 removed the 'Cfn' prefix from L1 constructs? Actually, CDK v2 retains 'Cfn' prefix. Breaking change: release 1.19.0 renamed some properties (e.g., 'lustre_configuration' -> 'lustreConfiguration').
fix Use camelCase property names for CDK v1 >=1.19.0. Example: 'lustreConfiguration' instead of 'lustre_configuration'.

Minimal CDK v1 stack creating an FSx for Lustre file system.

from aws_cdk import core
from aws_cdk.aws_fsx import CfnFileSystem

app = core.App()
stack = core.Stack(app, "MyStack")

fs = CfnFileSystem(stack, "MyFsx",
    file_system_type="LUSTRE",
    subnet_ids=["subnet-12345678"],
    storage_capacity=1200
)

app.synth()