-
Notifications
You must be signed in to change notification settings - Fork 252
Add full support for AWS chunked content encoding #4504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
031ead0
Add APIs to sign chunk and trailer
ysaito1001 09ac783
Add full support for aws-chunked content encoding
ysaito1001 fc4f052
Refactor the `content_encoding` module
ysaito1001 3093eb5
Add PutObject integration test for chunk signing
ysaito1001 687db11
Restore `AwsChunkedBody` to be `UnwindSafe` and `RefUnwindSafe`
ysaito1001 bfc4c27
Add a macro to hide a chain of mut calls to get signer
ysaito1001 07e8304
Make chunk size configurable for aws-chunked encoding
ysaito1001 ae611a8
Merge branch 'main' into ysaito/support-full-aws-chunked-encoding
ysaito1001 f1a2fe5
Add missing dependencies for aws-chunked inlineable to codegen
ysaito1001 a5bf6b4
Make the `config_size` method available only in S3
ysaito1001 6db6ba7
Add changelog
ysaito1001 f446c65
Update changelog to be a bug fix
ysaito1001 d660cd8
Clarify `chunk_size` doc wording
ysaito1001 b548022
Verify that custom chunk size of 0 is handled correctly
ysaito1001 1cca028
Move `SigV4MessageSigner::new` to another impl block
ysaito1001 6b4c372
Clarify body buffered when `chunk_size` set to `None`
ysaito1001 6c2382e
Merge branch 'main' into ysaito/support-full-aws-chunked-encoding
ysaito1001 ddbcb8e
Use constants for `AWS4-HMAC-SHA256-XXX`
ysaito1001 f229c4d
Preallocate `Vec` based on the number of headers
ysaito1001 ad0be20
Explain why `wake_by_ref` is necessary
ysaito1001 7cdc03a
Apply `AwsChunkedContentEncodingDecorator` only to S3
ysaito1001 5a80d67
Rename `chunk_size` to `aws_chunked_encoding_chunk_size`
ysaito1001 ec374a2
Update changelog entry
ysaito1001 3e4a2be
Merge branch 'main' into ysaito/support-full-aws-chunked-encoding
ysaito1001 3196cf7
Merge branch 'main' into ysaito/support-full-aws-chunked-encoding
ysaito1001 47e9d1f
Bump codegen version
ysaito1001 65e163e
Merge branch 'main' into ysaito/support-full-aws-chunked-encoding
ysaito1001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --- | ||
| applies_to: | ||
| - aws-sdk-rust | ||
| authors: | ||
| - ysaito1001 | ||
| references: | ||
| - smithy-rs#1798 | ||
| - smithy-rs#4188 | ||
| breaking: false | ||
| new_feature: true | ||
| bug_fix: true | ||
| --- | ||
| Add full support for [AWS chunked content encoding](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html). This affects S3's `PutObject` and `UploadPart` operations with streaming payloads. Streaming payloads are now split into 64 KiB chunks by default (the last chunk may be smaller) instead of being sent as a single chunk. | ||
|
|
||
| If the default chunk size does not suit the use case, it can be configured via the service config: | ||
|
|
||
| ``` | ||
| // Custom chunk size | ||
| let config = aws_sdk_s3::Config::builder() | ||
| .chunk_size(Some(10240)) // 10 KiB chunks | ||
|
ysaito1001 marked this conversation as resolved.
Outdated
ysaito1001 marked this conversation as resolved.
Outdated
|
||
| .build(); | ||
| let client = aws_sdk_s3::Client::from_conf(config); | ||
| ``` | ||
|
|
||
| ``` | ||
| // Disable chunking (buffers entire body in memory and sends it as one chunk) | ||
| let config = aws_sdk_s3::Config::builder() | ||
| .chunk_size(None) | ||
| .build(); | ||
| let client = aws_sdk_s3::Client::from_conf(config); | ||
| ``` | ||
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.