Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(lambda): (CDK lambdas still using node16) #26461

Closed
alexherriott opened this issue Jul 21, 2023 · 6 comments · Fixed by #26475
Closed

(lambda): (CDK lambdas still using node16) #26461

alexherriott opened this issue Jul 21, 2023 · 6 comments · Fixed by #26475
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. node18-upgrade Any work (bug, feature) related to Node 18 upgrade p1

Comments

@alexherriott
Copy link

Describe the bug

Since https://github.com/aws/aws-cdk/releases/tag/v2.87.0 CDK lambda runtime should be using node 18 runtime.

We are seeing some runtimes still using node 16 e.g. LogRetention lambda. (there may be more)

https://github.com/aws/aws-cdk/blob/v2.87.0/packages/aws-cdk-lib/aws-logs/lib/log-retention.ts

image

it seems to be defaulting to node_16 if a regional Fact is not set – where is this set? I couldn’t see anything in release notes relating to this. is this something AWS configures so that node 18 is used? Or do we have to do something?

Expected Behavior

node 18 runtime should be used in all CDK generated lambdas

Current Behavior

Node 16 is being used in some CDK generated lambdas

Reproduction Steps

this is autogenerated by CDK

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.87.0

Framework Version

2.87.0

Node.js Version

16

OS

Ubuntu standard:6.0

Language

Typescript

Language Version

No response

Other information

No response

@alexherriott alexherriott added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 21, 2023
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Jul 21, 2023
@mrgrain mrgrain added p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 21, 2023
@alexherriott
Copy link
Author

Hi

Any ETA on this?

Thanks

@mrgrain mrgrain self-assigned this Jul 31, 2023
lpizzinidev added a commit to lpizzinidev/aws-cdk that referenced this issue Aug 3, 2023
mergify bot pushed a commit that referenced this issue Aug 3, 2023
Migrate the LogRetention Custom Resource to AWS SDK v3.

Part of a fix for #26461 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@mergify mergify bot closed this as completed in #26475 Aug 4, 2023
mergify bot pushed a commit that referenced this issue Aug 4, 2023
Node18 is the default runtime environment for lambdas in the [default](https://aws.amazon.com/it/blogs/compute/node-js-18-x-runtime-now-available-in-aws-lambda/), [China](https://www.amazonaws.cn/en/new/2023/amazon-lambda-adds-support-for-node-js-18-in-amazon-web-services-china-regions/), and [GovCloud](https://aws.amazon.com/it/about-aws/whats-new/2023/04/aws-lambda-node-js-18-govcloud-regions/) regions.

This fix updates the runtime default versions for constructs that were still using older versions, in particular:

- `LogRetention`
- `AwsCustomResource`
- `CustomResourceProvider`

Also, it updates the `DefaultCrNodeVersionMap` in the fact tables to reflect the updated values.

Closes #26461.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

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

@lkoniecz
Copy link

lkoniecz commented Sep 4, 2023

@alexherriott

on 2.94
cdk diff does not show any differences
cdk deploy --all does not roll out handlers, they are still on node 14

@mrgrain
Copy link
Contributor

mrgrain commented Sep 4, 2023

on 2.94
cdk diff does not show any differences
cdk deploy --all does not roll out handlers, they are still on node 14

Hi @lkoniecz Thanks for reporting this. The team is currently aware of 2 custom resources that are still on node 16 (not 18).
Could you share some of the code and/or generated CFN template that is still using node 14 runtimes?

@mrgrain mrgrain added the node18-upgrade Any work (bug, feature) related to Node 18 upgrade label Sep 4, 2023
@lkoniecz
Copy link

lkoniecz commented Sep 4, 2023

@mrgrain
please disregard my previous comment - internal issue

@mrgrain
Copy link
Contributor

mrgrain commented Sep 4, 2023

No worries and thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. node18-upgrade Any work (bug, feature) related to Node 18 upgrade p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants