Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

NODEJS_14_X is deprecated and causes an error on cdk deploy #1387

Closed
GryphonInfoSec opened this issue Apr 10, 2024 · 3 comments
Closed

NODEJS_14_X is deprecated and causes an error on cdk deploy #1387

GryphonInfoSec opened this issue Apr 10, 2024 · 3 comments
Labels
bug This issue is a bug. p2 pr/work-in-progress This PR is a draft and needs further work.

Comments

@GryphonInfoSec
Copy link

Describe the bug

NODEJS_14_X is deprecated and causes an error on cdk deploy. This version is no longer supported by AWS, therefore the version should be upgraded to at least NODEJS_16.

Expected Behavior

Successful cdk deploy

Current Behavior

"The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs20.x) while creating or updating functions.

Reproduction Steps

line 24 of hitcounter.ts runtime: lambda.Runtime.NODEJS_14_X,
When running cdk deploy the error for unsupported runtime in AWS Lambda functions is received.

Possible Solution

Replace:
runtime: lambda.Runtime.NODEJS_14_X,
with:
runtime: lambda.Runtime.NODEJS_16_X,

Additional Information/Context

No response

CDK CLI Version

No response

Section

No response

Browser

No response

Language

No response

@GryphonInfoSec GryphonInfoSec added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2024
@ashishdhingra
Copy link
Contributor

@GryphonInfoSec Thanks for reporting the issue. I do recognize that Node 14.x is deprecated and we should fix the code example to change it to Node 16.x (at least). Thanks for the PR. Could you update your you PR to make similar change for Japanese version here.

Thanks,
Ashish

@ashishdhingra ashishdhingra added p2 pr/work-in-progress This PR is a draft and needs further work. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 12, 2024
@trivikr
Copy link

trivikr commented Jun 13, 2024

The NODEJS_16_X is also deprecated as of Jun 12, 2024 and function create will be blocked on Feb 28, 2025.
Lambda Supported Runtimes https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

It should be updated to NODEJS_20_X, which was made available on Nov 15, 2023

@kellertk kellertk closed this as completed Aug 1, 2024
Copy link

github-actions bot commented Aug 1, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. p2 pr/work-in-progress This PR is a draft and needs further work.
Projects
None yet
Development

No branches or pull requests

4 participants