Skip to content

AbortMultipartUpload

Source: src/AWS/S3/AbortMultipartUpload.ts

Runtime binding for s3:AbortMultipartUpload.

Discards an in-progress multipart upload and frees the storage its parts consume — abandoned uploads keep billing until aborted (or expired by a lifecycle rule). Provide the implementation with Effect.provide(AWS.S3.AbortMultipartUploadHttp).

// init — bind the operation to the bucket
const abortUpload = yield* AWS.S3.AbortMultipartUpload(bucket);
// runtime — clean up if the part-upload pipeline fails
yield* uploadAllParts.pipe(
Effect.tapError(() =>
abortUpload({ Key: "backups/archive.tar", UploadId }),
),
);