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 #1164

Closed
wants to merge 1 commit into from

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jul 31, 2024

Issue #, if available:
Fixes: #1145

Description of changes:
Migrates AWS SDK for JavaScript v2 APIs to v3

$ npx aws-sdk-js-codemod@2.21 -t v2-to-v3 source/**/*.js

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: githubautobuild-for-cdk-v2
  • Commit ID: 68487a6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@trivikr
Copy link
Member Author

trivikr commented Jul 31, 2024

Stopped working on this as there were multiple build failures when attempting to contribute

Error: Unable to locate jsii assembly for "@aws-solutions-constructs/core". If this module is not jsii-enabled, it must also be declared under bundledDependencies: Error: Cannot find module '/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/@aws-solutions-constructs/core/index.js'. Please verify that the package.json has a valid "main" entry
    at _tryResolveAssembly (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/lib/project-info.js:264:15)
    at DependencyResolver.resolveDependency (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/lib/project-info.js:197:26)
    at DependencyResolver.discoverDependencyTree (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/lib/project-info.js:157:33)
    at loadProjectInfo (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/lib/project-info.js:51:31)
    at Object.handler (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/lib/main.js:121:105)
    at /Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/node_modules/yargs/build/index.cjs:1:8993
    at j (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/node_modules/yargs/build/index.cjs:1:4956)
    at _.handleValidationAndGetResult (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/node_modules/yargs/build/index.cjs:1:8962)
    at _.applyMiddlewareAndGetResult (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/node_modules/yargs/build/index.cjs:1:9604)
    at _.runCommand (/Users/trivikr/workspace/aws-solutions-constructs/source/node_modules/jsii/node_modules/yargs/build/index.cjs:1:7231)
npm ERR! Lifecycle script `jsii` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @aws-solutions-constructs/aws-lambda-stepfunctions@2.63.0 
npm ERR!   at location: /Users/trivikr/workspace/aws-solutions-constructs/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions 
npm ERR! Lifecycle script `build+lint+test` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @aws-solutions-constructs/aws-lambda-stepfunctions@2.63.0 
npm ERR!   at location: /Users/trivikr/workspace/aws-solutions-constructs/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions 

This PR can be used for future reference, when the migration is prioritized.

@trivikr
Copy link
Member Author

trivikr commented Jul 31, 2024

After observing the diff, there are three less common API calls whose transformations are not implemented in aws-sdk-js-common

@trivikr trivikr closed this Jul 31, 2024
@trivikr trivikr deleted the aws-sdk-js-codemod branch July 31, 2024 21:00
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.

Use AWS SDK for JavaScript (v3) in examples
2 participants