Install & Compatibility
Where this runs
tested against v1.204.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 48.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.6s · import 0.000s · 49MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CfnFileSystem
✓ from aws_cdk.aws_fsx import CfnFileSystem
✗ from aws_cdk.aws_fsx import FileSystem
CDK v2 uses different class names; also, high-level constructs exist in separate modules.
CfnStorageVirtualMachine
✓ from aws_cdk.aws_fsx import CfnStorageVirtualMachine
✗ from aws_cdk.aws_fsx import StorageVirtualMachine
Ensure correct Cfn prefix for L1 constructs.
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()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_cdk.aws_fsx'
Missing aws-cdk-aws-fsx installation or wrong CDK version (v2 needs aws-cdk-lib).
fixFor 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).
AttributeError: 'CfnFileSystem' object has no attribute 'lustre_configuration'
CDK v1 >=1.19.0 switched to camelCase property names.
fixUse camelCase: 'lustreConfiguration' instead of 'lustre_configuration'.
jsii.errors.JSIIError: Expected an object, got undefined
Missing required property like 'subnet_ids' or 'storage_capacity' when creating CfnFileSystem.
fixEnsure all required properties are provided. For example, for LUSTRE: file_system_type='LUSTRE', subnet_ids=[...], storage_capacity=1200.
Upgrade
Version history
1.204.0latest on PyPI · released Jun 19, 2023
Audit
Dependencies
aws-cdk-librequiredCDK v2 uses aws-cdk-lib instead of individual packages; no longer needed.
constructsrequiredPeer dependency for CDK constructs.