Add new lambda runtimes and more parity fixes by joe4dev · Pull Request #9697 · localstack/localstack · GitHub
Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Add new lambda runtimes and more parity fixes#9697

Merged
joe4dev merged 12 commits into
masterfrom
add-new-lambda-runtimes
Nov 23, 2023
Merged

Add new lambda runtimes and more parity fixes#9697
joe4dev merged 12 commits into
masterfrom
add-new-lambda-runtimes

Conversation

@joe4dev

@joe4dev joe4dev commented Nov 20, 2023

Copy link
Copy Markdown
Member

Superseeds #9659 (Node 20) and #9685 (Java 20)
Big kudos to our community members @ataylorme and @eddumelendez for your initiative and efforts 👏👏👏 🥳

Motivation

AWS recently announced new Lambda runtimes (based on AL2023 such as Nodejs 20.x) and our currently supported runtimes have become outdated. Furthermore, more runtime changes including deprecations and new runtimes are expected to come in the future.

Updating runtimes is currently too cumbersome and many effects (both from us and contributors) are incomplete and need to be followed up by bugfixes.

Changes

This PR fixes AWS-parity for Lambda and updates many snapshots:

  • Add the new Lambda runtimes nodejs20.x, python3.12 (not yet in the docs but already live), java21,
    provided.al2023 (see https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
  • Centralize everything related to Lambda runtimes to simplify future updates
  • Add the deprecated runtimes nodejs12.x and dotnetcore3.1 to a DEPRECATED_RUNTIMES list but keep them available in LocalStack for now. We log a deprecation warning upon creating or updating deprecated runtimes.
  • Add a new marker lambda_runtime_update to filter test cases related to Lambda runtime updates for easier snapshot updates. This allows us to keep the tests grouped logically and easily update snapshots related to runtime updates.
  • Update many Lambda snapshots
  • Fix new AWS behavior enforcing stricter checks for large ZIP files (see RequestEntityTooLargeException) and a new higher limit for request size. Like in AWS, users will see the clearer zipped file size exception rather than the more confusing request size too large exception.
  • Fix updated validations
  • Add skip_snapshot_verify for some new AWS features (e.g. InvokeMode)
  • Fix timeout against AWS for test_vpc_config

Idea for v4

Having an opt-in flag such as LAMBDA_EXTENDED_RUNTIMES would enable deprecated as well as upcoming preview runtimes while maintaining full AWS parity.

TODO

What's left to do:

  • Follow up failing tests after full test run
  • Greenify ext PR

Follow Ups

@joe4dev joe4dev added the semver: patch Non-breaking changes which can be included in patch releases label Nov 20, 2023
@joe4dev joe4dev added this to the 3.0 milestone Nov 20, 2023
@joe4dev joe4dev self-assigned this Nov 20, 2023
@github-actions

github-actions Bot commented Nov 20, 2023

Copy link
Copy Markdown

@coveralls

coveralls commented Nov 21, 2023

Copy link
Copy Markdown

Coverage Status

coverage: 83.997%. remained the same
when pulling 7431537 on add-new-lambda-runtimes
into f354fd4 on master.

@dfangl dfangl modified the milestones: 3.0, 3.0.1 Nov 21, 2023
@joe4dev joe4dev force-pushed the add-new-lambda-runtimes branch from 7f440ef to d51147c Compare November 21, 2023 20:30
@joe4dev joe4dev marked this pull request as ready for review November 21, 2023 21:58

@dfangl dfangl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great set of changes! I think the marker for tests that need to be run for an update is a great idea!

Comment thread localstack/config.py
Comment thread localstack/services/lambda_/provider.py
Comment thread tests/aws/services/lambda_/dynamodb-local-metadata.json Outdated

@joe4dev joe4dev Nov 22, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't look into the implications of the added layer part for the implementation here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement request: add support for lambda runtime nodejs20.x

3 participants