Skip to content

fix: Lambda runtime selection#354

Merged
hoegertn merged 2 commits intomainfrom
fix-runtime
Mar 20, 2026
Merged

fix: Lambda runtime selection#354
hoegertn merged 2 commits intomainfrom
fix-runtime

Conversation

@hoegertn
Copy link
Contributor

@hoegertn hoegertn commented Mar 20, 2026

Summary

  • Replace hardcoded NODEJS_18_X runtime with NODEJS_LATEST, allowing it to stay current automatically
  • Respect user-provided runtime via lambdaOptions.runtime instead of silently overriding it
  • Bump minimum peer dependency for aws-cdk-lib to >=2.244.0 (required for Runtime.NODEJS_LATEST support)

Details

The LambdaFunction construct previously hardcoded Runtime.NODEJS_18_X, which meant:

All functions were pinned to an outdated Node.js version regardless of user configuration
Setting runtime in lambdaOptions had no effect since the spread was overridden

The fix changes func.ts:145 to props.lambdaOptions?.runtime ?? Runtime.NODEJS_LATEST, so user-specified runtimes are honored and the default tracks the latest Node.js version supported by Lambda.

hoegertn and others added 2 commits March 20, 2026 15:49
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@hoegertn hoegertn merged commit fc64eaf into main Mar 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant