Skip to content

Commit cdb096b

Browse files
committed
fix: remove unused aws-lambda package to eliminate aws-sdk v2 dependency
The `aws-lambda` npm package (a CLI deploy tool, last updated 2021) was listed as a production dependency in `webhook` and `aws-powertools-util` but is not used anywhere at runtime. All imports from 'aws-lambda' in the codebase resolve to `@types/aws-lambda` (TypeScript type definitions), which is already correctly declared as a devDependency. The `aws-lambda` package transitively pulls in `aws-sdk` v2 (EOL since Sep 2025), which triggers the dependency vulnerability scan (GHSA-j965-2qgj-vjmq). Since there is no patch for v2 — the advisory recommends migrating to v3 — the correct fix is to remove the unused package rather than suppressing the scanner. This eliminates aws-sdk v2 and its unnecessary transitive dependencies from the lockfile.
1 parent efbaa6f commit cdb096b

File tree

3 files changed

+8
-293
lines changed

3 files changed

+8
-293
lines changed

lambdas/functions/webhook/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"@middy/core": "^6.4.5",
3535
"@octokit/rest": "22.0.1",
3636
"@octokit/types": "^16.0.0",
37-
"@octokit/webhooks": "^14.2.0",
38-
"aws-lambda": "^1.0.7"
37+
"@octokit/webhooks": "^14.2.0"
3938
},
4039
"nx": {
4140
"includedScripts": [

lambdas/libs/aws-powertools-util/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"dependencies": {
2323
"@aws-lambda-powertools/logger": "^2.31.0",
2424
"@aws-lambda-powertools/metrics": "^2.31.0",
25-
"@aws-lambda-powertools/tracer": "^2.31.0",
26-
"aws-lambda": "^1.0.7"
25+
"@aws-lambda-powertools/tracer": "^2.31.0"
2726
},
2827
"nx": {
2928
"includedScripts": [

0 commit comments

Comments
 (0)