Skip to content

(lambda-nodejs): non-deterministic runtime version #13893

@zxkane

Description

@zxkane

❓ General Issue

The mutation default runtime of nodejs lambda looks like not a good practice.

/**
* 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions