Skip to content

chore: upgrade RIE to 1.38 - #9466

Merged
bnusunny merged 1 commit into
aws:developfrom
bnusunny:chore/upgrade-rie-1.38
Nov 24, 2026
Merged

bnusunny merged 1 commit into
aws:developfrom
bnusunny:chore/upgrade-rie-1.38

Conversation

@bnusunny

@bnusunny bnusunny commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Which issue(s) does this change fix?

N/A. Found by an Amazon Inspector scan of the published SAM build images (public.ecr.aws/sam/build-*).

Why is this change necessary?

The bundled RIE 1.37 is built with go1.26.7, which has Go stdlib CVE-2026-78663 (Critical in Amazon Inspector and ECR enhanced scanning). Every SAM build image bundles SAM CLI, so the finding shows up in all of them, for example build-java17.

How does it address the issue?

Replaces samcli/local/rapid/aws-lambda-rie-{x86_64,arm64} with the v1.38 release assets, built with go1.26.10. Same approach as #9209.

  • sha256 matches the release digests: x86_64 5ccd1df1…71616, arm64 65ade468…921d2.
  • strings on both binaries shows go1.26.10.
  • Amazon Inspector on the two v1.38 binaries: 0 Critical / 0 High (1 Medium, 1 Low). The 1.37 binaries had 1 Critical (CVE-2026-78663) and 9 High, plus 2 High in a bundled Go module.

What side effects does this change have?

None expected. RIE 1.38 is a patch release.

Mandatory Checklist

  • Review the generative AI contribution guidelines
  • Add input/output type hints to new functions/methods
  • Write design document if needed
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes (binary-only change)
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

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

Picks up go1.26.10, fixing Go stdlib CVE-2026-78663 (Critical in Amazon
Inspector / ECR enhanced scanning) that ships in every SAM build image via
the bundled RIE 1.37 (go1.26.7). Binaries are the v1.38 release assets;
sha256 matches the release digests.
@bnusunny
bnusunny requested a review from a team as a code owner November 24, 2026 06:14
@aws-sam-tooling-bot

Copy link
Copy Markdown

🧪 Hands-on test: No problems observed in 6 scenarios

Commit 22e9d69 · build LambdaToolingHandsOn-Docker:6b6ea9ee-b39b-401e-b93b-a7ed3c7491e4. The plan's scenarios ran on an isolated build host; a problem is reported only if it reproduced at least twice. Passing scenarios show only that these checks behaved as expected, not that the change is correct.

Scenarios

Scenario Planned check Result Runner's note
S1 Safety gate and main claim: both bundled RIE binaries are byte-identical to the official v1.38 release assets and match… ✅ pass GitHub release v1.38 (published 2026-10-30) lists aws-lambda-rie, aws-lambda-rie-x86_64 and aws-lambda-rie-arm64. The PR's x86_64 binary sha256 5ccd1df155e92aa3eb055e60fba492afdebf424626a7983b13a39aa…
S2 Confirm the stated fix: the new binaries are built with go1.26.10 (base: go1.26.7), are the correct ELF architectures, … ✅ pass Head: both binaries report go1.26.10 in go version -m (base: go1.26.7). file reports the x86_64 binary as ELF 64-bit x86-64 and the arm64 binary as ELF 64-bit ARM aarch64, both statically linked. Mod…
S3 Main path: sam local invoke of a python3.12 x86_64 ZIP function builds a fresh rapid image with the new RIE (run with t… ✅ pass Head: sam local invoke HelloFunction --force-image-build exits 0, prints statusCode 200 with msg hello and got v1, and stderr shows Building image plus START/END/REPORT with no entrypoint or flag err…
S4 Error paths the emulator handles: a handler exception and a function timeout still produce the same user-visible result… ✅ pass Head: FailFunction exits 0 and prints the JSON error with errorMessage 'boom from fail' and errorType ValueError, and stderr shows the traceback and END/REPORT. SlowFunction finishes after 5 s total,…
S5 sam local start-api with --warm-containers LAZY: the new RIE serves several invokes in one reused container. ✅ pass Head: sam local start-api --warm-containers LAZY served 3 curl calls, each with http=200, msg hello and a different rid. The log has 4 START RequestId lines (readiness probe plus 3 calls), each with …
S6 SAM_CLI_RIE_DEV=1 makes SAM start the emulator with '--log-level debug' (lambda_container._get_default_entry_point). Th… ✅ pass Head: with SAM_CLI_RIE_DEV=1, the invoke exits 0 with the same 200 response, and stderr contains [DEBUG] (rapid) lines (15 matches, e.g. 'Runtime API Server listening on 127.0.0.1:9001', 'Invoke() su…
S7 The arm64 binary works when SAM builds an arm64 image. Runs only if the sandbox can emulate linux/arm64; otherwise it p… ⏭️ skipped This sandbox cannot emulate arm64: docker run --platform linux/arm64 public.ecr.aws/lambda/python:3.12-arm64 uname fails with 'exec /usr/bin/uname: exec format error'. The arm64 binary was not run in…
Runner's notes in full
  • S1: GitHub release v1.38 (published 2026-10-30) lists aws-lambda-rie, aws-lambda-rie-x86_64 and aws-lambda-rie-arm64. The PR's x86_64 binary sha256 5ccd1df155e92aa3eb055e60fba492afdebf424626a7983b13a39aa5c2b71616 equals the downloaded aws-lambda-rie-x86_64 and aws-lambda-rie assets and the API digest. The arm64 binary sha256 65ade4687c22c308ff7acac6974d088d8aafaadea59e61985a083bad86f921d2 equals the downloaded asset and the API digest. Both match the PR description prefixes. Gate file /tmp/rie_verified was written before any container ran.
  • S2: Head: both binaries report go1.26.10 in go version -m (base: go1.26.7). file reports the x86_64 binary as ELF 64-bit x86-64 and the arm64 binary as ELF 64-bit ARM aarch64, both statically linked. Mode is -rwxr-xr-x on head and base, and git diff --summary shows no mode change.
  • S3: Head: sam local invoke HelloFunction --force-image-build exits 0, prints statusCode 200 with msg hello and got v1, and stderr shows Building image plus START/END/REPORT with no entrypoint or flag errors. sha256 of /var/rapid/aws-lambda-rie in public.ecr.aws/lambda/python:3.12-rapid-x86_64 equals the PR binary (5ccd1df1...71616). Base gives the same response, and its image holds the base binary (6b1e686e...). On base the START RequestId line was missing from stderr in this run. Head's SlowFunction run showed the same gap, so the line is dropped intermittently on both trees and the PR does not cause it.
  • S4: Head: FailFunction exits 0 and prints the JSON error with errorMessage 'boom from fail' and errorType ValueError, and stderr shows the traceback and END/REPORT. SlowFunction finishes after 5 s total, well short of the handler's 10 s sleep, with "Function 'SlowFunction' timed out after 2 seconds", '(rapid) Invoke failed error=errResetReceived', REPORT Duration 2000.00 ms and 'No response from invoke container'. Base shows the same wording and exit codes (4 s elapsed).
  • S5: Head: sam local start-api --warm-containers LAZY served 3 curl calls, each with http=200, msg hello and a different rid. The log has 4 START RequestId lines (readiness probe plus 3 calls), each with END/REPORT. Only the first REPORT has Init Duration, which shows the warm container was reused. One rapid container was running. After kill, no sam process remained and port 3999 was closed. Base behaves the same.
  • S6: Head: with SAM_CLI_RIE_DEV=1, the invoke exits 0 with the same 200 response, and stderr contains [DEBUG] (rapid) lines (15 matches, e.g. 'Runtime API Server listening on 127.0.0.1:9001', 'Invoke() success'). There is no 'flag provided but not defined' or invalid log level error. Base output is the same apart from the 'Runtime API Server listening' line (14 matches).
  • S7: This sandbox cannot emulate arm64: docker run --platform linux/arm64 public.ecr.aws/lambda/python:3.12-arm64 uname fails with 'exec /usr/bin/uname: exec format error'. The arm64 binary was not run in a container. Its hash and ELF arch were verified in S1 and S2.

🤖 Automated hands-on test — not a review approval · model claude-opus-5.5 · Kiro kiro-cli 2.33.1 · build LambdaToolingHandsOn-Docker:6b6ea9ee-b39b-401e-b93b-a7ed3c7491e4 · commit 22e9d69

History (1)
Commit Result When (UTC) Build
22e9d69 No problems observed 2026-11-24 06:24 LambdaToolingHandsOn-Docker:6b6ea9ee-b39b-401e-b93b-a7ed3c7491e4

@bnusunny
bnusunny added this pull request to the merge queue Nov 24, 2026
Merged via the queue into aws:develop with commit 8fd8d76 Nov 24, 2026
102 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants