Skip to content

Releases: jeffbski-rga/aws-s3-multipart-copy

v4.0.0 - Improved interface

01 Apr 20:27
62b9730
Compare
Choose a tag to compare

Breaking change - revised the interface to better match desired usage.

createDeps only receives the relevant S3 Commands and returns a set of async functions that can be wrapped with async retry functionality.

The CopyMultipart constructor now takes s3Client, the deps, params, an optional logger and a few extra options.

Example usage:

import {
    S3Client,
    CreateMultipartUploadCommand,
    AbortMultipartUploadCommand,
    CompleteMultipartUploadCommand,
    UploadPartCopyCommand,
    ListPartsCommand
} from "@aws-sdk/client-s3";

const awsClientS3Commands = {
    CreateMultipartUploadCommand,
    AbortMultipartUploadCommand,
    CompleteMultipartUploadCommand,
    UploadPartCopyCommand,
    ListPartsCommand
};
const awsClientDeps = createDeps(awsClientS3Commands);
// awsClientDeps async function properties can be wrapped with async/retry logic if desired

const s3Client = new S3Client({ region: 'us-east-1' });
const params = { /* copyObjectMultipartParams here */ };
const copyMultipart = new CopyMultipart({ s3Client, awsClientDeps, params });
await copyMultipart.done();

v3.0.0

12 Mar 22:02
7934bf7
Compare
Choose a tag to compare

Breaking Changes

  • uses AWS SDK V3
  • update the createDeps to input the AWS SDK V3 commands and S3Client so that any AWS SDK V3 version can be used (regardless of what was used in this library). These deps are passed into the CopyObjectMultipart constructor.
  • CopyObjectMultpart is now a class so it must be instantiated
  • request_context is now named requestContext

Details