Skip to content

blob/s3blob: migrate from deprecated s3/manager to s3/transfermanager#3715

Open
peczenyj wants to merge 1 commit into
google:masterfrom
peczenyj:migrate-s3-transfer-manager
Open

blob/s3blob: migrate from deprecated s3/manager to s3/transfermanager#3715
peczenyj wants to merge 1 commit into
google:masterfrom
peczenyj:migrate-s3-transfer-manager

Conversation

@peczenyj
Copy link
Copy Markdown
Contributor

Description

The AWS SDK v2 package github.com/aws/aws-sdk-go-v2/feature/s3/manager is now officially deprecated in favor of github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager. This PR migrates the s3blob driver to use the modern Transfer Manager client.

Changes

  • Replaced s3manager.Uploader with transfermanager.Client.
  • Updated NewTypedWriter to use tm.UploadObject.
  • Updated the BeforeWrite escape hatch to expose *transfermanager.UploadObjectInput and *transfermanager.Client.
  • Updated tests to reflect the new types.
  • Updated dependencies in go.mod and samples/go.mod.

Why Replays Need Regeneration

The transfermanager introduces different wire-level behavior compared to the old manager. Specifically, it often includes automatic integrity checks (like X-Amz-Sdk-Checksum-Algorithm: CRC32) and different user-agent strings. Since the existing recorded replays in testdata/ were generated using the old manager, they no longer match the requests made by the new implementation.

Note to Maintainers: Please regenerate the replays against the test infrastructure as part of the merge process.

Comment thread blob/s3blob/s3blob_test.go
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.

2 participants