Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 1.32 KB

File metadata and controls

32 lines (30 loc) · 1.32 KB
applies_to
aws-sdk-rust
authors
ysaito1001
references
smithy-rs#1798
smithy-rs#4188
breaking false
new_feature false
bug_fix true

Add full support for AWS chunked content encoding. AWS chunked content encoding enables streaming sigv4 for payloads without precomputing the sha256 of the entire payload. While this encoding was already used in S3's PutObject and UploadPart operations to support trailing checksums with non-chunked, unsigned streaming payloads, this release now splits streaming payloads into 64 KiB chunks by default (the last chunk may be smaller) and adds support for chunk signing (currently only activated for non-TLS requests).

If the default chunk size does not suit your use case, it can be configured via the service config:

// Custom chunk size
let config = aws_sdk_s3::Config::builder()
    .aws_chunked_encoding_chunk_size(Some(10240)) // 10 KiB chunks
    // other configurations
    .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()
    .aws_chunked_encoding_chunk_size(None)
    // other configurations
    .build();
let client = aws_sdk_s3::Client::from_conf(config);