createS3Transport
Purpose and behavior
Section titled “Purpose and behavior”Create a transport over your S3Client, imported from @elie-laloum/outpost/transports/s3. Writes are conditional PUTs and reads reject objects larger than maxBytes; removal is a conditional DELETE, or a hidden marker with deleteMode “tombstone” for R2. Outpost never destroys the client.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredS3TransportOptionsCaller-owned S3 client, bucket and isolated object prefix.options.clientRequiredS3ClientS3Client configured by the caller with region, credentials and any compatible endpoint. Outpost does not destroy it or forward its credentials to sandboxes.options.bucketRequiredstringExisting 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.options.prefixOptionalstring | undefinedKey prefix for every Outpost object, default the bucket root; must be a valid transport key, trailing slash allowed. Keep unrelated objects outside it.options.deleteModeOptional"conditional" | "tombstone" | undefinedHow 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.