Closed SukanyaHanumanthu closed 3 years ago
As we discussed offline, version 1.66.0 of the CDK is very old now. If customers use the latest version, they won't have this problem.
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.
@otaviomacedo I'm not sure if this helps but I do see a similar message as @SukanyaHanumanthu reported.
This was today on AMAZON LINUX. 11/19/2021
I changed line 55 from nodejs10 to nodejs14
and cdk deploy worked. BEFORE it failed with the nodejs10 error message.
48 const resource = new InLineLambda(this, 'Resource', {
49 type: resourceType,
50 properties: {
51 Description: 'AWS CloudFormation handler for "Custom::S3BucketNotifications" resources (@aws-cdk/aws-s3)',
52 Code: { ZipFile: `exports.handler = ${handler.toString()};` },
53 Handler: 'index.handler',
54 Role: role.roleArn,
55 Runtime: 'nodejs14.x',
56 Timeout: 300,
57 }
58 });
59 resource.node.addDependency(role);
60 this.functionArn = resource.getAtt('Arn').toString();
61 }
62 /**
63 * Defines a stack-singleton lambda function with the logic for a CloudFormation custom
64 * resource that provisions bucket notification configuration for a bucket.
65 *
66 * @returns The ARN of the custom resource lambda function.
67 */
68 static singleton(context) {
69 const root = cdk.Stack.of(context);
70 // well-known logical id to ensure stack singletonity
71 const logicalId = 'BucketNotificationsHandler050a0587b7544547bf325f094a3db834';
"../textract-pipeline/node_modules/@aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.js" 153 lines --35%-- 55,17 32%
Overview:
Hi Team,
Could you migrate your lambda functions by Sept 17th to
nodejs14.x
asnodejs10.x
is planned for deprecation?Refer https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html for more details
We have a customer reachout pointing that their functions are still running on CDK nodejs10.x lambda as the CDK's code has not been moved to use nodejs14.x.
Refer the lines below where CDK forces it's users to use nodejs10.x:
https://github.com/aws/aws-cdk/blob/v1.66.0/packages/%40aws-cdk/aws-s3/lib/notifications-resource/notifications-resource-handler.ts#L81
https://github.com/aws/aws-cdk/blob/v1.66.0/packages/%40aws-cdk/aws-logs/lib/log-retention.ts#L157
Please migrate to use the latest runtimes asap
Note that Lambda
Python27, Ruby25, Dotnetcore21
are planned to deprecate in Sept.Please assign it to the correct team if it does not belong to this CTI
This is a đź“ŠTracking Issue