powertools-lambda-typescript icon indicating copy to clipboard operation
powertools-lambda-typescript copied to clipboard

Maintenance: drop support for Node.js 16

Open dreamorosi opened this issue 1 year ago • 5 comments

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 --region flag 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

Future readers

Please react with 👍 and your use case to help us understand customer demand.

dreamorosi avatar Mar 13 '24 18:03 dreamorosi

Check the useDefineForClassFields value in tsconfig.json which will flip to true once we target ES2022 (docs).

dreamorosi avatar Mar 15 '24 13:03 dreamorosi

Consider removing errorWithCause type guard since starting from ES2022 all errors have a cause property.

dreamorosi avatar Mar 15 '24 13:03 dreamorosi

Check if noEmitHelpers can be enabled again for ESM build when target is ES2022 (ref #2230).

dreamorosi avatar Mar 15 '24 13:03 dreamorosi

Consider replacing occurrences of object.hasOwnProperty('foo') (example) with more modern alternative Object.hasOwn(object, 'foo') (docs) since it's supported in ES2022.

dreamorosi avatar Mar 15 '24 13:03 dreamorosi

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.

dreamorosi avatar Mar 15 '24 14:03 dreamorosi

⚠️ 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.

github-actions[bot] avatar Jul 02 '24 13:07 github-actions[bot]

This is now released under v2.4.0 version!

github-actions[bot] avatar Jul 11 '24 10:07 github-actions[bot]