Migrate Go v2 S3 examples from deprecated feature/s3/manager to featu…#7875
Draft
brmur wants to merge 17 commits intoawsdocs:mainfrom
Draft
Migrate Go v2 S3 examples from deprecated feature/s3/manager to featu…#7875brmur wants to merge 17 commits intoawsdocs:mainfrom
brmur wants to merge 17 commits intoawsdocs:mainfrom
Conversation
…re/s3/transfermanager The feature/s3/manager package was deprecated in February 2026 and replaced by feature/s3/transfermanager. This commit migrates all Go SDK v2 examples to use the new package. Key changes: - Replace manager.NewUploader/NewDownloader with transfermanager.New (unified client) - Replace uploader.Upload with tmClient.UploadObject (new UploadObjectInput type) - Replace downloader.Download with tmClient.DownloadObject (new DownloadObjectInput type) - Replace manager.NewWriteAtBuffer with tmtypes.NewWriteAtBuffer - Configure PartSize via Options.PartSizeBytes on the client - Use transfermanager/types.ChecksumAlgorithmSha256 for checksum config - Update go.mod dependencies from feature/s3/manager to feature/s3/transfermanager Files modified: - gov2/s3/actions/bucket_basics.go (UploadLargeObject, DownloadLargeObject) - gov2/s3/go.mod - gov2/workflows/s3_object_lock/actions/s3_actions.go (S3Actions struct, UploadObject) - gov2/workflows/s3_object_lock/actions/s3_actions_test.go - gov2/workflows/s3_object_lock/workflows/s3_object_lock.go - gov2/workflows/s3_object_lock/go.mod
The CI golangci-lint is built with Go 1.23 and cannot lint modules targeting Go 1.24. Downgrade the go directive to unblock CI.
Fix golangci-lint CI failures across all gov2 modules, not just the ones modified for the transfermanager migration.
The go 1.23 downgrade was incorrect — the modules need 1.24. The CI golangci-lint version needs to be updated separately. Running go mod tidy to resolve dependency issues instead.
The CI golangci-lint is built with Go 1.23 and cannot process modules targeting Go 1.24. Keep all gov2 go.mod files at go 1.23 until the CI toolchain is upgraded.
The go.sum files still referenced the old feature/s3/manager dependency but the go.mod now requires feature/s3/transfermanager. Removing them so CI can regenerate with correct checksums via go mod tidy.
Resolves 'no go files to analyze' CI errors by providing correct go.sum checksums for the new feature/s3/transfermanager dependency.
go mod tidy auto-upgraded to go 1.24 and added toolchain go1.24.2, which breaks CI golangci-lint (built with Go 1.23). Pin back to 1.23 and remove the toolchain directive.
Ran go mod tidy on bedrock-runtime, cloudfront, iam, lambda, and user_pools_and_lambda_triggers to resolve stale go.sum entries, then removed the toolchain go1.24.2 lines that go mod tidy auto-added. This fixes the 'no go files to analyze' golangci-lint errors.
aws-sdk-go-v2@v1.41.5 requires go 1.24 in its own go.mod, so downgrading to go 1.23 is not possible. The CI golangci-lint must be upgraded to a version built with Go 1.24+.
The go.mod files require go 1.24 (mandated by aws-sdk-go-v2@v1.41.5). Update the lint workflow to use Go 1.24 and golangci-lint v1.64.8 (built with Go 1.24 support). Also bump setup-go action to v5.
cec652e to
6cf7eaa
Compare
…adObject) v0.1.0 was an early release that only had PutObject. The UploadObject, DownloadObject, and related types were added in later versions. v0.1.18 is the latest and has the full API we need.
The newer SDK (v1.41.6) and transfermanager (v0.1.18) send additional fields by default that the test stubs weren't expecting: - GetObject now sends ChecksumMode: ENABLED - CreateMultipartUpload now sends ChecksumAlgorithm: CRC32 - UploadPart now sends ChecksumAlgorithm: CRC32 - DownloadObject uses part-based downloads (PartNumber) instead of byte-range downloads Updated stubs and large object test to match the new behavior.
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.
…re/s3/transfermanager
The feature/s3/manager package was deprecated in February 2026 and replaced by feature/s3/transfermanager. This commit migrates all Go SDK v2 examples to use the new package.
Key changes:
Files modified:
This pull request...
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.