Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4133 pages

Cloud and platforms

AWS SDK for JavaScript v2 End of Support: What Stopped, and the Move to v3

In short

The AWS SDK JavaScript v2 end of support date was 8 September 2025. Code on the `aws-sdk` package keeps running, but no release will fix a bug or a security issue in it again, and no new service, feature or Region will reach it. Moving to v3 is a one-time code change; the official codemod does much of it, but not pagination, middleware or error handling.

How did v2 get from maintenance mode to end of support?

AWS announced the timeline in advance, under its SDKs and Tools maintenance policy. The announcement's lifecycle table and the v2 README give these dates.

  • 19 June 2014 to 7 September 2024: general availability, with regular releases for new services, API updates, bug fixes and security fixes.
  • 8 September 2024 to 7 September 2025: maintenance mode. Releases were limited to critical bug fixes and security issues, with no API updates for new or existing services and no new Regions.
  • 8 September 2025 onward: end of support. The SDK receives no more updates or releases. Published versions stay on npm and the source stays on GitHub.
  • Version 3, the replacement, has been generally available since December 2020, according to the v2 README.

Checked against: source 1, source 2

What does AWS SDK JavaScript v2 end of support change for code already running?

Less than people fear on day one, and more over time. The announcement says existing applications continue to function as intended unless an AWS service changes in a fundamental way, which it calls uncommon and says would be broadly communicated.

The cost is in everything that has not happened yet. A flaw found in v2 after 8 September 2025 has no release to fix it, and a service feature launched after that date is not reachable from v2 clients. The npm registry now marks the latest aws-sdk version, 2.1693.0, as deprecated, with a message saying v2 no longer receives updates and pointing to v3.

If a Lambda function already fails because aws-sdk is missing on a newer Node.js runtime, this fix page covers that case first.

Checked against: source 1, source 3

Which v3 differences force a code change?

The migration page, the v3 README and the UPGRADING notes in the v3 repository describe the same rewrite from different angles. Joined, these are the changes a v2 codebase cannot avoid.

In v2In v3In the codemod's transformation list
One `aws-sdk` package and a global `AWS.config`A package per service (`@aws-sdk/client-*`) and config passed to each client; no global configYes, imports, client creation and config, with a note that clients outside the file may need manual work
`client.operation(params).promise()` or callbacks`client.send(new XxxCommand(params))`, or the aggregated client's method without `.promise()`Yes, removal of `.promise()`
Event listeners on a requestA middleware stack, with `client.middlewareStack.add` and named stepsNo
Credential classes such as `SharedIniFileCredentials`Functions returning a promise of credentials, such as `fromIni` and `fromEnv`; the default chain keeps its orderYes, credential and token providers
Response tokens and hand-written page loops`paginateListTables` and other async generators for `for await` loopsNo
`client.waitFor('bucketExists')`Standalone `waitUntilBucketExists({ client, maxWaitTime }, input)`Yes, waiters
`error.code` and status on the error objectMetadata moved into subfields such as `error.$metadata`No

Checked against: source 4, source 5, source 6, source 8

What does the codemod not reach?

Beyond the table, the UPGRADING notes list behaviour that changes quietly. S3 GetObject returned a buffered Buffer in v2 but returns a stream in v3, and in Node.js the stream must be consumed or the socket is not freed. Lambda invoke no longer turns Payload into a string for you.

The DynamoDB Document Client moved to @aws-sdk/lib-dynamodb and no longer drops undefined values when marshalling unless removeUndefinedValues is set to true. The codemod does list transforms for the Document Client, S3 getSignedUrl and S3 multipart upload, which now live in @aws-sdk/s3-request-presigner and @aws-sdk/lib-storage.

These are the places I would test by hand after the codemod has run, because a wrong result there compiles and only fails at runtime.

Checked against: source 5, source 8

How is the official codemod run?

aws-sdk-js-codemod is AWS's wrapper around jscodeshift, published under MIT-0, with one named transform, v2-to-v3. Its README shows a dry run that prints the converted files first, then the run that writes them. The README asks you to review the change thoroughly before production and to report transforms that come out incomplete or wrong.

npx aws-sdk-js-codemod@latest --dry --print -t v2-to-v3 PATH...
npx aws-sdk-js-codemod@latest -t v2-to-v3 PATH...

Checked against: source 4, source 7

Which Node.js and TypeScript versions does v3 expect?

v3 ships often: the README says releases usually happen once per weekday, each bumping the minor version. Its Node.js floor rises with them. Versions from 3.968.0 require Node.js 20 or newer, and 3.723.0 onward required 18.

The README also states the rule behind those floors: support for a Node.js LTS line is dropped about eight months after that line's end of life, in the following January. TypeScript 5.5 and older lose SDK support on 4 January 2027. A team moving off v2 on an old Node line should plan the runtime upgrade together with the SDK change.

When the new clients cannot find credentials, see this fix page.

Checked against: source 6

What else do people ask?

Will AWS still fix a security issue in SDK v2?

No. The announcement's lifecycle table says that from 8 September 2025 the SDK receives no further updates or releases. Security fixes were only part of the maintenance window that ended on 7 September 2025.

Can v2 and v3 run in the same application during the move?

The v3 README shows importing a v2 Lambda client and a v3 one under different variable names, so a service-by-service move is possible. Each v2 call left in place still carries the end-of-support risk.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. This page joins AWS documents fetched on 20 Nov 2026 (the end-of-support announcement, the v2 README, the npm registry entry, the v3 migration guide, the v3 README and UPGRADING notes, and the codemod's README and transformation list). I did not migrate an application for it. It does not cover browser bundles, React Native, other AWS SDK languages or service-specific v3 clients beyond the ones named. Found a mistake? Tell me.

Keep reading

Next step

Have a project in mind?

Tell me about it. A discovery call within 48 hours.