aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.56k stars 3.87k forks source link

CustomResource: Set default version to NODEJS_18_X #26932

Closed kenneth-prophero closed 1 year ago

kenneth-prophero commented 1 year ago

Describe the feature

Similar to #19117, it seems like the default node version is still set to NODEJS_16_X, can we update the default node version of custom resources to NODEJS_18_X?

Use Case

NODEJS_16_X is going to be deprecated soon

Proposed Solution

No response

Other Information

No response

Acknowledgements

CDK version used

2.93.0

Environment details (OS name and version, etc.)

Linux

kenneth-prophero commented 1 year ago

Just found out that certificates are using NODEJS14.X

"frontendCertificateCertificateRequestorFunctionE9585EBF": {
      "DependsOn": [
        "frontendCertificateCertificateRequestorFunctionServiceRoleDefaultPolicyF0BECD2F",
        "frontendCertificateCertificateRequestorFunctionServiceRoleCEE596A2",
      ],
      "Properties": {
        "Code": {
          "S3Bucket": "cdk-hnb659fds-assets-my-account-us-east-1",
          "S3Key": "a1466b91ba8942c1f5251540844c3af7879992dead6cbbd88e38bfb77a07ad8d.zip",
        },
        "Handler": "index.certificateRequestHandler",
        "Role": {
          "Fn::GetAtt": [
            "frontendCertificateCertificateRequestorFunctionServiceRoleCEE596A2",
            "Arn",
          ],
        },
        "Runtime": "nodejs14.x",
        "Timeout": 900,
      },
      "Type": "AWS::Lambda::Function",
    },
pahud commented 1 year ago

This should have been fixed in https://github.com/aws/aws-cdk/pull/26475

Just found out that certificates are using NODEJS14.X

Are you able to provide a smallest code snippet that reproduces this?

mng-prophero commented 1 year ago

we're using SST and it appears that the latest version of SST is referencing aws-cdk-lib v2.91.0

https://github.com/sst/sst/issues/3263

khushail commented 1 year ago

@kenneth-prophero , could you please share which custom resources are using NODEJS_16_X ?

github-actions[bot] commented 1 year ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

pahud commented 1 year ago

We shipped https://github.com/aws/aws-cdk/pull/26763 in 2.93.0 and https://github.com/aws/aws-cdk/pull/26921 in 2.94.0

If you are still seeing NODEJS14.X anywhere, please provide a smallest code snippet so we can fix it immediately.

github-actions[bot] commented 1 year ago

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] commented 1 year ago

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