Upgrade aws-sdk v2 to @aws-sdk/client-s3 v3 #844
Open
AnkitSegment wants to merge 2 commits intomasterfrom
Open
Upgrade aws-sdk v2 to @aws-sdk/client-s3 v3 #844AnkitSegment wants to merge 2 commits intomasterfrom
AnkitSegment wants to merge 2 commits intomasterfrom
Conversation
mdkhan-tw
reviewed
Feb 13, 2026
mdkhan-tw
reviewed
Feb 13, 2026
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.
Summary
scripts/upload-assets.jsfrom the monolithicaws-sdkv2 to the modular@aws-sdk/client-s3v3 package@aws-sdk/client-s3@3.722.0, the last version supporting the repo's Node 16 runtimeChanges
scripts/upload-assets.jsrequire('aws-sdk/clients/s3')withconst { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3')new S3Client({ region, credentials: { ... } })instead ofnew S3({ accessKeyId, secretAccessKey, sessionToken, region })s3.putObject(params).promise()withs3.send(new PutObjectCommand(params))throughout (putObject helper + 2 manifest uploads)package.json"aws-sdk": "^2.760.0"with"@aws-sdk/client-s3": "3.722.0"in devDependenciesTest Screenshot
The uploadAssets function is used by makefile, when it calls new version of build get uploaded in s3.
Staging commit hash SHA: 532ade6
CDN link: https://cdn.segment.build/next-integrations/manifest-532ade6.json
S3 file update.
Test plan
node -c scripts/upload-assets.js— syntax check passesS3Client,PutObjectCommand, andclient.send()all functionalyarn testpasses (no integration tests affected — this is a build-only script)Bucket,Key,Body,ContentType,GrantRead,GrantFullControl,ContentEncoding,CacheControl) are identical between v2 and v3 APIs🤖 Generated with Claude Code