Closed juwara0 closed 3 months ago
This could be a bundling issue using node20 and maybe you need to try DockerImage for the docker-based bundling. This would ensure your code would be bundled in a self-contained environment using node20. This is probably something we could explore and investigate.
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.
Describe the bug
A Lambda that is working successfully with Runtime.NODEJS_18_X that when updated to Runtime.NODEJS_20_X is now failing with this error in CloudWatch: INIT_START Runtime Version: nodejs:20.v15 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:0856f5d760b75612d4aa6b5feda50bafc1ce3ba07c036cbd0abc585dc28fb870
[AWS Parameters and Secrets Lambda Extension] 2024/02/08 19:39:40 PARAMETERS_SECRETS_EXTENSION_LOG_LEVEL is error. Log level set to error.
EXTENSION Name: AWSParametersAndSecretsLambdaExtension State: Ready Events: [INVOKE, SHUTDOWN]
INIT_REPORT Init Duration: 77.30 ms Phase: init Status: error Error Type: Runtime.ExitError
RequestId: 89fcebe3-f830-4861-8686-f4e7f3c31114 Error: Runtime exited with error: exit status 127 Runtime.ExitError
Expected Behavior
Updating the runtime of the Lambda should not cause this error.
Current Behavior
INIT_START Runtime Version: nodejs:20.v15 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:0856f5d760b75612d4aa6b5feda50bafc1ce3ba07c036cbd0abc585dc28fb870
[AWS Parameters and Secrets Lambda Extension] 2024/02/08 19:39:40 PARAMETERS_SECRETS_EXTENSION_LOG_LEVEL is error. Log level set to error.
EXTENSION Name: AWSParametersAndSecretsLambdaExtension State: Ready Events: [INVOKE, SHUTDOWN]
INIT_REPORT Init Duration: 77.30 ms Phase: init Status: error Error Type: Runtime.ExitError
Reproduction Steps
const paramsAndSecrets = ParamsAndSecretsLayerVersion.fromVersion( ParamsAndSecretsVersions.V1_0_103, { cacheSize: 500, logLevel: ParamsAndSecretsLogLevel.ERROR, } );
Possible Solution
No response
Additional Information/Context
Using "aws-cdk-lib": "2.114.1", the lambda with params and secrets layer lambda extension works successfully with NODEJS_18_X. Upon updating the lambda runtime to NODEJS_20_X we now are seeing errors in CloudWatch:
CDK CLI Version
2.124.0 (build 4b6724c)
Framework Version
No response
Node.js Version
Node 20.11.0
OS
Mac OS X Sonoma 14.3
Language
TypeScript
Language Version
typescript@5.2.2
Other information
No response