Skip to content

CreateDataRepositoryTask

Source: src/AWS/FSx/CreateDataRepositoryTask.ts

Runtime binding for the CreateDataRepositoryTask operation scoped to one Lustre file system (IAM actions fsx:CreateDataRepositoryTask and fsx:TagResource on the file system ARN and on arn:aws:fsx:*:*:task/*).

Starts a bulk data movement between the bound Lustre FileSystem and its linked S3 data repository — EXPORT_TO_REPOSITORY, IMPORT_METADATA_FROM_REPOSITORY, or RELEASE_DATA_FROM_FILESYSTEM — from inside a function runtime, e.g. exporting results after a compute job completes. A task already executing surfaces the typed DataRepositoryTaskExecuting. Provide the implementation with Effect.provide(AWS.FSx.CreateDataRepositoryTaskHttp).

const createDataRepositoryTask =
yield* AWS.FSx.CreateDataRepositoryTask(scratch);
const response = yield* createDataRepositoryTask({
Type: "EXPORT_TO_REPOSITORY",
Paths: ["results/"],
Report: { Enabled: false },
});
yield* Effect.log(`task ${response.DataRepositoryTask?.TaskId} started`);