Skip to content

LocationS3

Source: src/AWS/DataSync/LocationS3.ts

A DataSync location backed by an Amazon S3 bucket. Locations are the source and destination endpoints referenced by a Task.

S3 locations are immutable apart from their tags: any change to the bucket, subdirectory, storage class, or access role replaces the location. Reconcile is idempotent across state loss — the location is re-discovered by its deterministic s3://… URI.

Bucket root

import * as AWS from "alchemy/AWS";
const source = yield* AWS.DataSync.LocationS3("Source", {
s3BucketArn: bucket.bucketArn,
bucketAccessRoleArn: role.roleArn,
});

Prefix + storage class

const dest = yield* AWS.DataSync.LocationS3("Dest", {
s3BucketArn: bucket.bucketArn,
bucketAccessRoleArn: role.roleArn,
subdirectory: "/archive",
s3StorageClass: "STANDARD_IA",
});