AWS SDK v2 Dropped from Node.js 18+ Lambda Runtimes, Migration to v3 Required
AWS Lambda runtimes from Node.js 18.x onward no longer bundle the monolithic aws-sdk v2 package, causing import errors for developers who upgraded without updating their dependencies. AWS has replaced it with the modular AWS SDK for JavaScript v3, where each service is installed as a separate package under the @aws-sdk namespace. The shift is further compelled by aws-sdk v2 reaching end-of-support on September 8, 2025, meaning it will no longer receive security patches. Migrating to v3 requires importing specific Client and Command classes, wrapping parameters in Command objects, and dropping the older .promise() syntax. Developers who cannot migrate immediately can bundle aws-sdk v2 directly, but this adds roughly 25 MB of cold-start overhead and should be treated as a temporary workaround rather than a long-term solution.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in