-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(lambda-nodejs): non-deterministic runtime version #13893
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS Lambda@aws-cdk/aws-lambda-nodejsbugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.p1
Description
❓ General Issue
The mutation default runtime of nodejs lambda looks like not a good practice.
aws-cdk/packages/@aws-cdk/aws-lambda-nodejs/lib/function.ts
Lines 33 to 40 in df5c133
| /** | |
| * The runtime environment. Only runtimes of the Node.js family are | |
| * supported. | |
| * | |
| * @default - `NODEJS_14_X` if `process.versions.node` >= '14.0.0', | |
| * `NODEJS_12_X` otherwise. | |
| */ | |
| readonly runtime?: lambda.Runtime; |
Assuming a NodejsFunction lambda with default runtime, the unit test will fail if the CI uses matrix nodejs versions, such as 12.x, 14.x.
The Question
Environment
- CDK CLI Version: 1.95.1
- Module Version:
- Node.js Version: 12.x / 14.x
- OS:
- Language (Version):
Other information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambdaRelated to AWS LambdaRelated to AWS Lambda@aws-cdk/aws-lambda-nodejsbugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.p1