Skip to content

fix: stream upload to S3#905

Open
fenos wants to merge 1 commit intomasterfrom
storage/improve-upload-performance
Open

fix: stream upload to S3#905
fenos wants to merge 1 commit intomasterfrom
storage/improve-upload-performance

Conversation

@fenos
Copy link
Contributor

@fenos fenos commented Mar 12, 2026

What kind of change does this PR introduce?

Improvement

What is the current behavior?

Currently, we upload to S3 using the Upload class form the @aws-sdk/lib-storage.
This library seems to be buffering in memory each chunk before uploading them to S3, (that's because it needs to calculate the size of the stream)

What is the new behavior?

We do know the content length in most cases, so we can simply pipe the body into the PutObject method so that we stream it all at once

@fenos fenos requested a review from a team as a code owner March 12, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant