Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate AWS SDK for JavaScript v2 APIs to v3 #234

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

trivikr
Copy link

@trivikr trivikr commented Nov 8, 2023

Issue

From AWS SDK for JavaScript v2 README:

We are formalizing our plans to make the Maintenance Announcement (Phase 2) for AWS SDK for JavaScript v2 in 2023.

Description

This PR migrates AWS SDK for JavaScript v2 APIs to v3 using aws-sdk-js-codemod.

$ npx aws-sdk-js-codemod@0.26.2 -t v2-to-v3 packages/lib/aws.ts

Copy link

vercel bot commented Nov 8, 2023

@trivikr is attempting to deploy a commit to the databerry Team on Vercel.

A member of the Team first needs to authorize it.

@trivikr trivikr marked this pull request as ready for review November 8, 2023 08:27
@gmpetrov
Copy link
Owner

gmpetrov commented Nov 9, 2023

@trivikr there's other files where we call s3.(...).promise(), are those calls still compatible with v3 ?

// e.g. apps/dashboard/pages/api/datasources/index.ts 
await s3.putObject(params).promise();

@trivikr
Copy link
Author

trivikr commented Nov 9, 2023

there's other files where we call s3.(...).promise(), are those calls still compatible with v3 ?

Thanks for the catch.

The codemod missed transforming these files, as the type of the client is any.
Codemod only does API transformations which it knows are accurate. It doesn't remove .promise() from any other API calls the source code might be making. I've created a feature request for it at aws/aws-sdk-js-codemod#697

I'll verify those usages, and manually remove .promise() calls though for the purpose of this PR.

@trivikr
Copy link
Author

trivikr commented Nov 9, 2023

I'll verify those usages, and manually remove .promise() calls though for the purpose of this PR.

@gmpetrov Fixed in 61ec165

@trivikr
Copy link
Author

trivikr commented Feb 19, 2024

@gmpetrov I rebase changes since last three months, and also migrated JS SDK v2 APIs in newly introduced webhook.

Are there any other changes needed to test this change in CI, and merge?

@trivikr
Copy link
Author

trivikr commented Mar 11, 2024

AWS SDK for JavaScript v2 will enter maintenance mode on September 8, 2024 and reach end-of-support on September 8, 2025.

For more information, check blog post at https://a.co/cUPnyil

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.

None yet

2 participants