Skip to content

SDK v3 upload has three times as many API calls vs v2 for some streams #2581

@Linkgoron

Description

@Linkgoron

Describe the bug

We've recently upgraded to SDK v3 from SDK v2, and we've noticed that in some of our services, those using upload, the number of API calls has tripled vs SDK v2 for a lot of our smaller uploads, and obviously this also noticeably increased everything related to more API calls to S3. The reason is that SDK v2 upload has specific code for streams that finish before the upload starts, and uses a single PUT command to upload the file in one go. In SDK v3, lib-storage does not have this optimization, and always uses the create/upload/complete commands.

This kind of behaviour was very unexpected for us when we upgraded from an older version to a newer version, and we definitely did not expect a tripling of the number API calls. Is there a specific reason why this behavior was not ported to v3, or any reason that this will not get ported in the future?

Note that the upgrade guide claims that In v3, @aws-sdk/lib-storage package is available. It supports all the features offered in v2 upload(), and supports both Node.js and browsers runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceGeneral information and guidance, answers to FAQs, or recommended best practices/resources.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions