Commit 56f9ae8
authored
fix: remove unused aws-lambda package to eliminate aws-sdk v2 dependency (github-aws-runners#5088)
## Summary
The `aws-lambda` npm package
([npmjs.com/package/aws-lambda](https://www.npmjs.com/package/aws-lambda))
is a CLI deploy tool last published in November 2021. It is listed as a
production dependency in `webhook` and `aws-powertools-util`, but **is
not used anywhere at runtime**.
Every `import` from `'aws-lambda'` in the codebase (e.g. `import {
Context, SQSEvent } from 'aws-lambda'`) resolves to `@types/aws-lambda`
— TypeScript type definitions that are erased at compile time.
`@types/aws-lambda` is already correctly declared as a `devDependency`
in all packages that use it.
### Why this matters
The `aws-lambda` package transitively depends on `aws-sdk@^2.814.0`
(v2), which reached end-of-support on September 8, 2025. Advisory
[GHSA-j965-2qgj-vjmq](GHSA-j965-2qgj-vjmq)
flags all of aws-sdk v2 with no patch available — the only remediation
is migrating to v3. This causes the **Dependency vulnerability scan** to
fail on any PR that modifies the lockfile enough to trigger a dependency
graph rebuild.
### What this PR does
- Removes `aws-lambda` from `dependencies` in
`lambdas/functions/webhook/package.json` and
`lambdas/libs/aws-powertools-util/package.json`
- Regenerates `yarn.lock`, eliminating `aws-sdk` v2 and its transitive
dependency tree from the lockfile
### What this PR does NOT do
- Does not change any source code — no runtime behavior changes
- Does not remove `@types/aws-lambda` (the TypeScript types) — those
remain as devDependencies
## Test plan
- [x] All 352 tests pass (`yarn test` across all 7 projects)
- [x] Dependency vulnerability scan should now pass (no more aws-sdk v2
in the dependency graph)1 parent c00d4c2 commit 56f9ae8
3 files changed
Lines changed: 8 additions & 293 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
0 commit comments