Skip to content

Conversation

@chungjac
Copy link
Contributor

@chungjac chungjac commented Oct 13, 2025

Problem

AWS SDK V2 is at EOL. All client should migrate to V3.

Solution

More work has been done to migrate these clients:

  • sts
  • ecr
  • ec2
  • lambda
  • awserror (does not exist in v2, should be serviceException in v3)

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@chungjac chungjac force-pushed the migrate-service branch 5 times, most recently from d92f77c to 24f0a05 Compare October 14, 2025 03:52
@chungjac chungjac changed the title refactor(core): migrate sts refactor(core): migrate various clients from aws-sdk v2 to v3 pt2 Oct 14, 2025
@chungjac chungjac marked this pull request as ready for review October 14, 2025 18:27
@chungjac chungjac requested a review from a team as a code owner October 14, 2025 18:27
private static readonly metadataServiceTimeout: number = 500
// AWS EC2 Instance Metadata Service (IMDS) constants
// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-v2-how-it-works.html
private static readonly metadataServiceHost: string = '169.254.169.254'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be hardcoded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2 had an abstraction layer and would use these values internally:

v3 removed the abstraction layer, so v3 uses Smithy's httpRequest() which requires us to specify the host and path

@chungjac chungjac merged commit 3177528 into aws:feature/v2-to-v3-migration Oct 15, 2025
22 checks passed
chungjac added a commit that referenced this pull request Oct 21, 2025
## Note
**There is still a little bit more work needed for fully migrating
aws-sdk v2 to v3, specifically all of these clients
[here](https://github.com/aws/aws-toolkit-vscode/blob/59fd17fcfa22798e78d0df196290edb4a070f7ec/packages/core/scripts/build/generateServiceClient.ts#L232-L251)
from the `generateServiceClient.ts` script**


## Problem
AWS SDK V2 is at EOL

## Solution
Migrate AWS SDK V2 to V3

This work has been done in the `feature/v2-to-v3-migration` feature
branch and thus merging it into `master`

Here are the PRs, which this does not include the merges from main and
resolving conflicts:
- #8043
- #8042
- #8046
- #8054
- #8041
- #8056
- #8081
- #8069
- #8067
- #8093
- #8095
- #8094
- #8171
- #8159
- #8175
- #8182



## Testing
Manually tested the [prerelease
builds](https://github.com/aws/aws-toolkit-vscode/releases/tag/pre-v2-to-v3-migration)


https://github.com/user-attachments/assets/b1d4795c-4027-462e-a195-509ac4a9d8ae


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: aws-toolkit-automation <[email protected]>
Co-authored-by: Tai Lai <[email protected]>
Co-authored-by: invictus <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
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.

4 participants