Skip to content

feat: add java8.al2023, java11.al2023, java17.al2023 runtime support#9125

Open
ckawl wants to merge 3 commits into
aws:developfrom
ckawl:feat/java-al2023-runtimes
Open

feat: add java8.al2023, java11.al2023, java17.al2023 runtime support#9125
ckawl wants to merge 3 commits into
aws:developfrom
ckawl:feat/java-al2023-runtimes

Conversation

@ckawl

@ckawl ckawl commented Jul 14, 2026

Copy link
Copy Markdown

Which issue(s) does this change fix?

Support for java8.al2023, java11.al2023, java17.al2023 Lambda managed runtimes launching July 20, 2026.

Why is this change necessary?

AWS Lambda is releasing AL2023 variants of Java 8, 11, and 17 runtimes. SAM CLI needs to recognize these runtimes so users can sam init, sam build, and sam local invoke
with them.

Additionally, the existing patch_runtime function uses .replace(".al2", "") which incorrectly mangles .al2023 (producing java8023 instead of java8). This must be
fixed before the new runtimes can work.

How does it address the issue?

  • Fixes patch_runtime to strip .al2023 before .al2 (order matters to avoid substring match)
  • Adds all 3 runtimes to: architecture.py, workflow_config.py, runtime_template.py, lambda_image.py, samcli.json
  • Adds debug settings entries in lambda_debug_settings.py (same settings as base runtimes)
  • Fixes compare_runtimes in init_flow_helpers.py to handle .al2023 suffix for consistent sort order
  • Follows the exact same pattern as existing java8.al2

What side effects does this change have?

None. All changes are additive. Existing runtimes are unaffected — verified by running unit tests (358 pass), mypy, Black, and ruff.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ckawl added 3 commits July 13, 2026 10:41
Add support for Java AL2023 runtimes across SAM CLI:
- Fix patch_runtime to correctly strip .al2023 suffix before passing to lambda-builders
- Add runtimes to architecture, workflow config, runtime templates, image mappings
- Update schema and help text
- Add unit tests for new runtimes
- Add java8.al2023, java11.al2023, java17.al2023 to entrypoint_mapping
  in lambda_debug_settings.py (same settings as base runtimes)
- Fix compare_runtimes in init_flow_helpers.py to handle .al2023 suffix
  (previous logic only checked .endswith(".al2"), causing non-antisymmetric
  comparator for al2023 pairs)
- Update _DEBUG_RUNTIMES in test_lambda_debug_settings.py
Add java8.al2023, java11.al2023, java17.al2023 to:
- test_building_java_in_process (non-container, will pass in CI)
- test_building_java_in_container_al2023 (container, will pass once SAM build images are published)
@github-actions github-actions Bot added area/local/start-api sam local start-api command area/init sam init area/build sam build command area/local/invoke sam local invoke command area/local/start-invoke area/schema JSON schema file pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jul 14, 2026
@ckawl ckawl marked this pull request as ready for review July 14, 2026 00:25
@ckawl ckawl requested a review from a team as a code owner July 14, 2026 00:25
@ckawl ckawl self-assigned this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build sam build command area/init sam init area/local/invoke sam local invoke command area/local/start-api sam local start-api command area/local/start-invoke area/schema JSON schema file pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants