Skip to content
Français

S3TransportOptions

import type { S3TransportOptions } from "@elie-laloum/outpost/transports/s3";
  • clientRequired
    S3Client
    S3Client configured by the caller with region, credentials and any compatible endpoint. Outpost does not destroy it or forward its credentials to sandboxes.
  • bucketRequired
    string
    Existing private bucket that supports conditional PUT and paginated listing, plus conditional DELETE in the default delete mode. The transport never creates it; an empty name rejects.
  • prefixOptional
    string | undefined
    Key prefix for every Outpost object, default the bucket root; must be a valid transport key, trailing slash allowed. Keep unrelated objects outside it.
  • deleteModeOptional
    "conditional" | "tombstone" | undefined
    How remove() works: “conditional” (default) sends a conditional DELETE; “tombstone”, for R2, overwrites the object with a hidden 1 KiB marker and makes list() send one HEAD per object. Every writer of a prefix must use the same mode; purge markers only after stopping them all.
import type { S3Client } from "@aws-sdk/client-s3";

export interface S3TransportOptions {
  readonly client: S3Client;
  readonly bucket: string;
  readonly prefix?: string;
  readonly deleteMode?: "conditional" | "tombstone";
}