CLI to find resources which call AWS using JavaScript SDK v2
- Install Node.js.
- Set up SDK authentication with AWS with the required permissions for the task.
Running npx @aws-sdk/find-v2 returns help information.
$ npx @aws-sdk/find-v2
Usage: @aws-sdk/find-v2 [options] [command]
CLI to find resources which call AWS using JavaScript SDK v2
Options:
-v, --version output the version number
-h, --help display help for command
Commands:
lambda Scans Lambda Node.js Functions for JavaScript SDK v2.
help [command] display help for commandRun lambda command to scan Lambda Node.js Functions for JavaScript SDK v2.
$ npx @aws-sdk/find-v2 lambda --yes --output table
┌─────────────────────────────────────────┬───────────┬────────────┬────────────┬────────────────────┐
│ FunctionName │ Region │ Runtime │ SdkVersion │ ContainsAwsSdkJsV2 │
├─────────────────────────────────────────┼───────────┼────────────┼────────────┼────────────────────┤
│ fn-without-aws-sdk-in-bundle │ us-east-2 │ nodejs24.x │ >=2.0.0 │ No. │
├─────────────────────────────────────────┼───────────┼────────────┼────────────┼────────────────────┤
│ fn-with-aws-sdk-in-bundle │ us-east-2 │ nodejs24.x │ >=2.0.0 │ Yes. Found in: │
│ │ │ │ │ - index.js │
├─────────────────────────────────────────┼───────────┼────────────┼────────────┼────────────────────┤
│ fn-with-aws-sdk-in-package-json-deps │ us-east-2 │ nodejs24.x │ >=2.0.0 │ Yes. Found in: │
│ │ │ │ │ - index.mjs │
├─────────────────────────────────────────┼───────────┼────────────┼────────────┼────────────────────┤
│ fn-without-aws-sdk-in-package-json-deps │ us-east-2 │ nodejs24.x │ >=2.0.0 │ No. │
└─────────────────────────────────────────┴───────────┴────────────┴────────────┴────────────────────┘This script requires AWS Managed Policy AWSLambda_ReadOnlyAccess. It lists all Lambda functions, and performs download, unzip and scan for mentions of JS SDK v2.
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.