Skip to content
GitHubXDiscord

LocationFSxLustre

The LocationFSxLustre resource allows you to manage AWS DataSync Location FSx Lustre for transferring data to and from Amazon FSx for Lustre file systems.

Create a basic DataSync LocationFSxLustre with required properties and one optional property.

import AWS from "alchemy/aws/control";
const locationFSxLustre = await AWS.DataSync.LocationFSxLustre("myLocationFSxLustre", {
FsxFilesystemArn: "arn:aws:fsx:us-west-2:123456789012:file-system/fs-0123456789abcdef0",
SecurityGroupArns: [
"arn:aws:ec2:us-west-2:123456789012:security-group/sg-0123456789abcdef0"
],
Subdirectory: "/data"
});

Configure a DataSync LocationFSxLustre with tags for better resource management.

const taggedLocationFSxLustre = await AWS.DataSync.LocationFSxLustre("taggedLocationFSxLustre", {
FsxFilesystemArn: "arn:aws:fsx:us-west-2:123456789012:file-system/fs-0123456789abcdef0",
SecurityGroupArns: [
"arn:aws:ec2:us-west-2:123456789012:security-group/sg-0123456789abcdef0"
],
Subdirectory: "/data",
Tags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "DataPipeline" }
]
});

If you want to adopt an existing DataSync LocationFSxLustre resource instead of failing when it already exists, set the adopt property to true.

const existingLocationFSxLustre = await AWS.DataSync.LocationFSxLustre("existingLocationFSxLustre", {
FsxFilesystemArn: "arn:aws:fsx:us-west-2:123456789012:file-system/fs-0123456789abcdef0",
SecurityGroupArns: [
"arn:aws:ec2:us-west-2:123456789012:security-group/sg-0123456789abcdef0"
],
Subdirectory: "/existing-data",
adopt: true
});