CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-pulumi--aws

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources with infrastructure-as-code.

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

fsx.mddocs/storage/

FSx - Managed File Systems

Amazon FSx provides fully managed third-party file systems (Lustre, Windows File Server, NetApp ONTAP, OpenZFS).

Common Tasks

Create FSx for Lustre file system

import * as aws from "@pulumi/aws";

const lustre = new aws.fsx.LustreFileSystem("hpc-storage", {
    storageCapacity: 1200,
    subnetIds: [subnet.id],
    deploymentType: "PERSISTENT_1",
    perUnitStorageThroughput: 200,
    tags: { Name: "hpc-lustre" },
});

Create FSx for Windows File Server

import * as aws from "@pulumi/aws";

const windows = new aws.fsx.WindowsFileSystem("file-server", {
    storageCapacity: 300,
    subnetIds: [subnet.id],
    throughputCapacity: 16,
    activeDirectoryId: ad.id,
    tags: { Name: "windows-fs" },
});

Create FSx for NetApp ONTAP

import * as aws from "@pulumi/aws";

const ontap = new aws.fsx.OntapFileSystem("ontap-storage", {
    storageCapacity: 1024,
    subnetIds: [subnet1.id, subnet2.id],
    deploymentType: "MULTI_AZ_1",
    throughputCapacity: 256,
    preferredSubnetId: subnet1.id,
    tags: { Name: "ontap-fs" },
});

Core Resources

FSx supports multiple file system types:

  • LustreFileSystem - High-performance file system for compute workloads
  • WindowsFileSystem - Windows-native file system
  • OntapFileSystem - NetApp ONTAP file system
  • OpenZfsFileSystem - OpenZFS file system

LustreFileSystem

High-performance parallel file system optimized for compute-intensive workloads.

class LustreFileSystem extends pulumi.CustomResource {
    constructor(name: string, args: LustreFileSystemArgs, opts?: pulumi.CustomResourceOptions);

    readonly arn: pulumi.Output<string>;
    readonly dnsName: pulumi.Output<string>;
    readonly id: pulumi.Output<string>;
}

interface LustreFileSystemArgs {
    storageCapacity: pulumi.Input<number>;
    subnetIds: pulumi.Input<pulumi.Input<string>[]>;
    deploymentType?: pulumi.Input<"SCRATCH_1" | "SCRATCH_2" | "PERSISTENT_1" | "PERSISTENT_2">;
    perUnitStorageThroughput?: pulumi.Input<number>;
    importPath?: pulumi.Input<string>; // S3 bucket path
    exportPath?: pulumi.Input<string>; // S3 bucket path
    autoImportPolicy?: pulumi.Input<"NONE" | "NEW" | "NEW_CHANGED" | "NEW_CHANGED_DELETED">;
    storageType?: pulumi.Input<"SSD" | "HDD">;
    securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Example: Lustre with S3 integration

const lustre = new aws.fsx.LustreFileSystem("ml-training", {
    storageCapacity: 2400,
    subnetIds: [subnet.id],
    deploymentType: "PERSISTENT_1",
    perUnitStorageThroughput: 200,
    importPath: `s3://${dataBucket.bucket}/training-data`,
    exportPath: `s3://${dataBucket.bucket}/results`,
    autoImportPolicy: "NEW_CHANGED",
    storageType: "SSD",
    tags: {
        Name: "ml-training-storage",
        Purpose: "machine-learning"
    },
});

WindowsFileSystem

Fully managed Windows file server with SMB protocol support.

class WindowsFileSystem extends pulumi.CustomResource {
    constructor(name: string, args: WindowsFileSystemArgs, opts?: pulumi.CustomResourceOptions);

    readonly arn: pulumi.Output<string>;
    readonly dnsName: pulumi.Output<string>;
    readonly id: pulumi.Output<string>;
}

interface WindowsFileSystemArgs {
    storageCapacity: pulumi.Input<number>;
    subnetIds: pulumi.Input<pulumi.Input<string>[]>;
    throughputCapacity: pulumi.Input<number>;
    activeDirectoryId?: pulumi.Input<string>;
    selfManagedActiveDirectory?: pulumi.Input<SelfManagedActiveDirectory>;
    deploymentType?: pulumi.Input<"SINGLE_AZ_1" | "SINGLE_AZ_2" | "MULTI_AZ_1">;
    preferredSubnetId?: pulumi.Input<string>;
    automaticBackupRetentionDays?: pulumi.Input<number>;
    dailyAutomaticBackupStartTime?: pulumi.Input<string>;
    securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Example: Windows file server with Active Directory

const windowsFs = new aws.fsx.WindowsFileSystem("corp-files", {
    storageCapacity: 1000,
    subnetIds: [subnet1.id, subnet2.id],
    throughputCapacity: 32,
    activeDirectoryId: managedAd.id,
    deploymentType: "MULTI_AZ_1",
    preferredSubnetId: subnet1.id,
    automaticBackupRetentionDays: 30,
    dailyAutomaticBackupStartTime: "03:00",
    securityGroupIds: [fsSg.id],
    tags: {
        Name: "corporate-file-server",
        Environment: "production"
    },
});

OntapFileSystem

NetApp ONTAP file system with multi-protocol support (NFS, SMB, iSCSI).

class OntapFileSystem extends pulumi.CustomResource {
    constructor(name: string, args: OntapFileSystemArgs, opts?: pulumi.CustomResourceOptions);

    readonly arn: pulumi.Output<string>;
    readonly id: pulumi.Output<string>;
    readonly endpoints: pulumi.Output<OntapFileSystemEndpoints>;
}

interface OntapFileSystemArgs {
    storageCapacity: pulumi.Input<number>;
    subnetIds: pulumi.Input<pulumi.Input<string>[]>;
    deploymentType: pulumi.Input<"SINGLE_AZ_1" | "MULTI_AZ_1">;
    throughputCapacity: pulumi.Input<number>;
    preferredSubnetId: pulumi.Input<string>;
    endpointIpAddressRange?: pulumi.Input<string>;
    fsxAdminPassword?: pulumi.Input<string>;
    routeTableIds?: pulumi.Input<pulumi.Input<string>[]>;
    securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Example: Multi-AZ ONTAP file system

const ontap = new aws.fsx.OntapFileSystem("enterprise-storage", {
    storageCapacity: 2048,
    subnetIds: [subnet1.id, subnet2.id],
    deploymentType: "MULTI_AZ_1",
    throughputCapacity: 512,
    preferredSubnetId: subnet1.id,
    endpointIpAddressRange: "198.19.255.0/24",
    routeTableIds: [routeTable.id],
    securityGroupIds: [ontapSg.id],
    tags: {
        Name: "enterprise-ontap",
        Environment: "production"
    },
});

OpenZfsFileSystem

Fully managed OpenZFS file system with data compression and snapshots.

class OpenZfsFileSystem extends pulumi.CustomResource {
    constructor(name: string, args: OpenZfsFileSystemArgs, opts?: pulumi.CustomResourceOptions);

    readonly arn: pulumi.Output<string>;
    readonly id: pulumi.Output<string>;
    readonly dnsName: pulumi.Output<string>;
}

interface OpenZfsFileSystemArgs {
    storageCapacity: pulumi.Input<number>;
    subnetIds: pulumi.Input<pulumi.Input<string>[]>;
    throughputCapacity: pulumi.Input<number>;
    deploymentType: pulumi.Input<"SINGLE_AZ_1" | "SINGLE_AZ_2">;
    rootVolumeConfiguration?: pulumi.Input<OpenZfsRootVolumeConfiguration>;
    securityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Example: OpenZFS with compression

const zfs = new aws.fsx.OpenZfsFileSystem("app-storage", {
    storageCapacity: 512,
    subnetIds: [subnet.id],
    throughputCapacity: 64,
    deploymentType: "SINGLE_AZ_1",
    rootVolumeConfiguration: {
        dataCompressionType: "ZSTD",
        nfsExports: [{
            clientConfigurations: [{
                clients: "10.0.0.0/16",
                options: ["rw", "crossmnt", "no_root_squash"]
            }]
        }]
    },
    tags: {
        Name: "app-data-storage",
        Compression: "enabled"
    },
});

Use Cases by File System Type

FSx for Lustre

  • High-performance computing (HPC)
  • Machine learning training
  • Media processing
  • Financial modeling
  • Genomics research

FSx for Windows

  • Windows applications
  • Active Directory integration
  • Home directories
  • Content management
  • Microsoft SQL Server

FSx for NetApp ONTAP

  • Enterprise applications
  • Multi-protocol access (NFS, SMB, iSCSI)
  • Database workloads
  • VMware Cloud on AWS
  • Hybrid cloud storage

FSx for OpenZFS

  • Data-intensive applications
  • Media streaming
  • DevOps workflows
  • Application migration from on-premises ZFS

Best Practices

  • Choose deployment type based on availability requirements
  • Use Multi-AZ for production workloads requiring high availability
  • Enable automatic backups for data protection
  • Size throughput capacity based on performance needs
  • Use security groups to control file system access
  • Tag file systems for cost tracking and management

For complete FSx API with 12 resources and data sources, see All Services.

Related Services

  • EC2 - Mount FSx file systems on EC2 instances
  • ECS/EKS - Persistent storage for containerized applications
  • S3 - Data repository for FSx for Lustre
  • Active Directory - Integration for FSx for Windows
  • Backup - Automated backup management
  • DataSync - Migrate data to FSx file systems
  • CloudWatch - Monitor file system performance and usage

Install with Tessl CLI

npx tessl i tessl/npm-pulumi--aws

docs

index.md

quickstart.md

README.md

tile.json