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

(custom-resources): use lambda.Runtime.NODEJS_18_X by default in Provider #23682

Closed
2 tasks
twulf opened this issue Jan 13, 2023 · 7 comments
Closed
2 tasks
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@twulf
Copy link

twulf commented Jan 13, 2023

Describe the feature

Similar to #19117 we should update to latest supported Node.js runtime for the custom-resources lambda prior to Node 14 going out of service.

Use Case

All lambdas created by aws-cdk internally should be updated prior to EOL.

Proposed Solution

Update to NODEJS_18_X when creating lambda in custom-resources.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.60.0

Environment details (OS name and version, etc.)

MacOS 12.6.2

@twulf twulf added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 13, 2023
@github-actions github-actions bot added the @aws-cdk/custom-resources Related to AWS CDK Custom Resources label Jan 13, 2023
@peterwoodworth peterwoodworth added p1 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 3, 2023
@wilhen01
Copy link
Contributor

+1 for this. Node 14 EOL is now rapidly approaching!

@pahud
Copy link
Contributor

pahud commented Apr 19, 2023

Node18 has been supported in GovCloud and AWS China regions as well. I believe we can create a PR for this now.

@cornelcroi
Copy link

Hi,

Any updates on this?
I have an application impossible to deploy now.
Any workaround possible?
Thanks.

@kaizencc
Copy link
Contributor

@cornelcroi we are working to move to Node 18 but your application should not be impossible to deploy. If you are seeing errors related to Node 12, then you need to update your aws-cdk-lib version. aws-cdk-lib exclusively uses Node 14+ currently.

@anoppe
Copy link

anoppe commented Jul 7, 2023

It might not be the most elegant solution, but If you don't want to be blocked by CDK lib releases, you could also use an aspect to change the runtime of the lambda created by, for example, the provider framework.
A naive example, written in Java:

// Change the provider framework lambda runtime to node18.
Aspects.of(this).add(node -> {
    if (node instanceof CfnFunction) {
        if (((CfnFunction) node).getRuntime().startsWith("node")
                && !((CfnFunction) node).getRuntime().equals("nodejs18.x")) {
            ((CfnFunction) node).setRuntime("nodejs18.x");
        }
    }
});

@peterwoodworth
Copy link
Contributor

We did this, but we have missed some. Closing this in favor of the bug report that's more up to date #26461

@github-actions
Copy link

⚠️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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/custom-resources Related to AWS CDK Custom Resources effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests

7 participants