Skip to content

Conversation

@kuhe
Copy link
Contributor

@kuhe kuhe commented Dec 22, 2025

Issue

#7596
#6949
#7509

Description

Amazon S3 responds with

InvalidChunkSizeError: Only the last chunk is allowed to have a size less than 8192 bytes

To summarize the issue from when the feature was added: The error is thrown when checksums are enabled and the input stream (e.g. S3 PutObject) sends a chunk of size less than 8kb. Because of the transform applied by AWS Chunked Encoding, Node.js' http automatic buffering does not happen.

The JS SDK should append

InvalidChunkSizeError: Only the last chunk is allowed to have a size less than 8192 bytes. Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.

To assist users towards one of the solutions provided by the SDK if they wish to use it. It is not automatically enabled for performance reasons.

Testing

Updated e2e test.

Checklist

  • If the PR is a feature, add integration tests (*.integ.spec.ts).
  • If you wrote E2E tests, are they resilient to concurrent I/O?
  • If adding new public functions, did you add the @public tag and enable doc generation on the package?

@kuhe kuhe requested a review from a team as a code owner December 22, 2025 16:49
@kuhe kuhe merged commit 6fa3b4c into main Dec 22, 2025
7 checks passed
@kuhe kuhe deleted the kuhe/checksum-message branch December 22, 2025 17:55
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.

3 participants