Support multipart_threshold for downloads using CRT - #10634
Merged
Conversation
aemous
reviewed
Sep 11, 2026
aemous
left a comment
Contributor
There was a problem hiding this comment.
Left a few clarifying questions.
aemous
self-requested a review
September 11, 2026 21:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CRT's S3 client exposes
multipart_upload_threshold, so it's straightforward to map the CLI'smultipart_thresholdconfig value. But it currently doesn't expose or supportmultipart_download_thresholdso we work around it by comparing the object size tomultipart_thresholdbefore handing off the request to CRT, and explicitly set the request type toS3RequestType.DEFAULT. See https://github.com/awslabs/aws-crt-python/blob/3a967bb6bee00acd099c23aa3d2bbc28e30ccf24/awscrt/s3.py#L464-L470I intentionally made
CRTTransferConfigminimal, only supportingmultipart_threshold, because in the future we're going to want to remove this work and directly use a supportedmultipart_download_thresholdinterface. I wanted to avoid other changes trying to use the CRT transfer config.