-
Notifications
You must be signed in to change notification settings - Fork 647
Description
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.