Maintenance: drop support for Node.js 16
Summary
[!important] Starting from July 1, 2024 Powertools for AWS Lambda (TypeScript) will end support for Node.js 16.
This action follows the date when AWS Lambda will mark the nodejs16.x as deprecated and precedes the date after which you will no longer be able to create new functions using the runtime.
We recommend that you upgrade your existing Node.js 16 functions to Node.js 20 before July 1st, 2024.
End of support does not impact existing functions and functions using versions of Powertools for AWS Lambda (TypeScript) released before the date, however starting from this date we will not guarantee compatibility with Node.js 16.
You can use the following AWS CLI command to list all functions in a specific region using Node.js 16, including published function versions:
[!Note] Make sure to replace the value of the
--regionflag and run this command in each region you have Lambda functions workloads
aws lambda list-functions --function-version ALL --region <Region> --output text --query "Functions[?Runtime=='nodejs16.x'].FunctionArn"
Why is this needed?
Starting from July 15, 2024 we will no longer be able to deploy new Lambda functions using the nodejs16.x runtime, this means we will no longer be able to run integration tests for new code changes.
With this in mind, and considering our iteration cycles last two weeks, we plan on dropping support for the runtime just two weeks before the date.
Which area does this relate to?
Governance
Solution
No response
Acknowledgment
- [X] This request meets Powertools for AWS Lambda (TypeScript) Tenets
- [ ] Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Check the useDefineForClassFields value in tsconfig.json which will flip to true once we target ES2022 (docs).
Consider removing errorWithCause type guard since starting from ES2022 all errors have a cause property.
Check if noEmitHelpers can be enabled again for ESM build when target is ES2022 (ref #2230).
Consider replacing occurrences of object.hasOwnProperty('foo') (example) with more modern alternative Object.hasOwn(object, 'foo') (docs) since it's supported in ES2022.
Consider replacing usage of Array.prototype.indexOf() with Array.prototype.at() where it makes sense, since it's supported in ES2022 and also works in reverse order (i.e. array.at(-1) gets you the last item) - docs.
⚠️ COMMENT VISIBILITY WARNING ⚠️
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
This is now released under v2.4.0 version!