You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature(s3/manager): add option to control default checksums
As announced in #2960,
AWS SDK for Go v2 service/s3 v1.73.0 shipped a change
(#2808) that adopted new
default integrity protections, automatically calculating CRC32 checksums
for operations like PutObject and UploadPart.
While it is possible to revert to the previous behavior by setting
`AWS_REQUEST_CHECKSUM_CALCULATION=when_required`, this config setting
did not apply to the S3 Manager multipart uploader, which always enabled
CRC32 checksums by default regardless of the global setting.
This commit adds a new `RequestChecksumCalculation` field to the Uploader
struct that allows users to control checksum behavior:
- `RequestChecksumCalculationWhenSupported` (default): Always calculates
CRC32 checksums for multipart uploads
- `RequestChecksumCalculationWhenRequired`: Only calculates checksums
when explicitly set by the user, preserving backwards compatibility
For example:
```go
uploader := manager.NewUploader(client, func(u *manager.Uploader) {
u.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired
})
```
S3 Express One Zone buckets always require CRC32 checksums regardless of
this setting, as mandated by the S3 Express service requirements. The
uploader automatically detects S3 Express buckets (names ending with
`--x-s3`) and applies CRC32 checksums unconditionally.
Fixes#3007
Signed-off-by: Stan Hu <[email protected]>
0 commit comments