Skip to content

Archil.AWS reference

Source: packages/archil/src/AWS/S3Disk.ts

An Archil disk that keeps its files in your own S3 bucket, with no access keys anywhere: the bucket’s policy trusts Archil’s IAM role for your region, only on behalf of disks in your Archil organization. The disk’s files are ordinary objects in the bucket, so any S3 tool can read them.

Set your Archil organization id in your profile (alchemy profile edit --add Archil) or as ARCHIL_ORGANIZATION; the policy can’t be scoped without it.

import * as ArchilAWS from "@alchemy.run/archil/AWS";
export const Store = AWS.S3.Bucket("Store", {});
export const Dataset = ArchilAWS.S3Disk("Dataset", { bucket: Store, prefix: "datasets/" });