aws-samples / aws-cdk-examples

Example projects using the AWS CDK
Apache License 2.0
4.96k stars 2.1k forks source link

aws-cdk-examples/typescript/lambda-manage-s3-event-notification: CloudFormation timeout #918

Closed twocoins-ca closed 8 months ago

twocoins-ca commented 9 months ago

Describe the bug

On the sample: aws-cdk-examples/typescript/lambda-manage-s3-event-notification

First, Lambda no longer supports noejs.12.x

"Resource handler returned message: "The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions. "

If we update to: runtime: lambda.Runtime.NODEJS_18_X,

The cloudformation timeout.

2023-09-12 17:24:12 UTC-0400 | ised-sanity-SQS-Stack | ROLLBACK_IN_PROGRESS | The following resource(s) failed to create: [SampleBucketNotification]. Rollback requested by user. -- | -- | -- | -- 2023-09-12 17:24:10 UTC-0400 | SampleBucketNotification | CREATE_FAILED | CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [dbec3974-7e77-424e-9bda-061e456119b5]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.

Expected Behavior

no timeout

Current Behavior

timeout

Reproduction Steps

npm install cdk deploy --all

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.95.1 (build ae455d8)

Framework Version

No response

Node.js Version

v18.8.0

OS

aws linux 2

Language

Typescript

Language Version

No response

twocoins-ca commented 9 months ago

aws-cdk-examples/typescript/lambda-manage-s3-event-notification

"errorMessage": "Error: Cannot find module 'aws-sdk'\nRequire stack:\n- /var/task/manage-s3-event-notifications.js\n- /var/runtime/index.mjs",
twocoins-ca commented 9 months ago

2023-09-13T17:49:20.360Z undefined ERROR Uncaught Exception { "errorType": "Runtime.ImportModuleError", "errorMessage": "Error: Cannot find module 'aws-sdk'\nRequire stack:\n- /var/task/manage-s3-event-notifications.js\n- /var/runtime/index.mjs", "stack": [ "Runtime.ImportModuleError: Error: Cannot find module 'aws-sdk'", "Require stack:", "- /var/task/manage-s3-event-notifications.js", "- /var/runtime/index.mjs", " at _loadUserApp (file:///var/runtime/index.mjs:1061:17)", " at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1093:21)", " at async start (file:///var/runtime/index.mjs:1256:23)", " at async file:///var/runtime/index.mjs:1262:1" ] }

kaiz-io commented 8 months ago

Fixed in #908

github-actions[bot] commented 8 months 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.