Repository navigation
docs(lambda): document bundling image version pinning - #38650
mergify[bot] merged 20 commits into
Conversation
|
Automated review A maintainer will still review this — treat the notes below as a starting point. 📌 Commit This PR documents how to pin the Lambda bundling image version (in response to #38404). It expands the JSDoc on The change is documentation only, with no API, behavior or synthesis impact, and the new text matches the code and the AWS SAM documentation. The only finding is optional: the asset-hash sentence should say it applies to the default hash type. Maintainers may also want to confirm that documentation alone is enough to close #38404. The predefined runtimes still point at a floating image, so "Relates to" may fit better than "Closes". 🔴 0 blocking · 🟡 0 recommended · ⚪ 1 optional Files with findings (1)
Generated automatically. React 👍 or 👎 to tell us whether this review helped, so we can improve these reviews. |
There was a problem hiding this comment.
See the review summary comment for the overview; the notes below are inline.
Co-authored-by: maintainer-for-aws[bot] <223376586+maintainer-for-aws[bot]@users.noreply.github.com>
matboros
left a comment
There was a problem hiding this comment.
Thanks for applying the earlier suggestions, including the NodejsFunction fix. The section reads much better now. One small correction is still needed on the new custom-runtime example; the other inline suggestions are optional polish.
Resolved
NodejsFunctionpinning advice in the JSDoc (thread · resolved in 507d7dd) — now pins the base image through a customRuntimewithbundlingDockerImage. (Thebundling.dockerImageexample I suggested earlier was wrong, sorry for the extra round.)- Pinned image wired into the bundling options (thread · resolved in 3565a55) — the example now passes the pinned image to
bundling.imagewithRuntime.JAVA_21. :latestand local cache wording (thread · resolved in b3d6c06) — no longer implies a fresh pull.- Tag meaning and digest pinning (thread · resolved in d160e6b) — explains SAM CLI release tags and shows
@sha256:pinning. - JSDoc scope and
@seelink (thread · resolved in 10286ed) — covers custom runtimes and links the SAM image docs. DockerImagenaming (thread · resolved in 8f1a304) — prose matches the snippets.
New findings: 7 — see the inline comments below.
Pull request has been modified.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
🚫 Left the queue · pull request branch update failed1 min in the queue, with no time running CI. So far
Reason The pull request can't be updated
To get back in the queue
Requeue requested — the merge queue status continues in this comment ↓. Times in UTC · dashboard · how the merge queue works |
Pull request has been modified.
There was a problem hiding this comment.
See the review summary comment for the overview; the notes below are inline.
| reproducible build, pin the image by digest instead (`public.ecr.aws/sam/build-java21@sha256:<digest>`). The bundling | ||
| image is part of the asset hash, so changing the pinned tag or digest updates the function code on the next deployment, | ||
| even if your source code is unchanged. |
There was a problem hiding this comment.
⚪ Optional — The sentence saying the bundling image is part of the asset hash, so changing the pinned tag or digest always updates the function code, reads as unconditional. It only holds under the default AssetHashType.SOURCE (and CUSTOM). With AssetHashType.OUTPUT or BUNDLE, the hash comes from the bundled output, so changing the image triggers an update only if that output changes. Documented behavior should match what the code does (default-behavior).
| reproducible build, pin the image by digest instead (`public.ecr.aws/sam/build-java21@sha256:<digest>`). The bundling | |
| image is part of the asset hash, so changing the pinned tag or digest updates the function code on the next deployment, | |
| even if your source code is unchanged. | |
| reproducible build, pin the image by digest instead (`public.ecr.aws/sam/build-java21@sha256:<digest>`). With the default | |
| asset hash type (`AssetHashType.SOURCE`), the bundling image is part of the asset hash, so changing the pinned tag or | |
| digest updates the function code on the next deployment, even if your source code is unchanged. |
|
@matboros Thank you for the review and approval! The merge queue couldn't update this branch from That push dismissed the earlier approval. Could you re-approve when you have a moment? Thank you! |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
✅ Merged into
|
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #38404.
Reason for this change
Predefined Lambda runtimes expose untagged AWS SAM build images. Those images follow the latest published image, so their bundled tool versions can change independently of the AWS CDK version. Users whose builds require a specific tool version need clear guidance on selecting an explicit image tag.
Description of changes
Runtime.bundlingImage.This is a documentation-only change. It does not pin CDK's predefined runtime images or change any runtime behavior.
Describe any new or updated permissions being added
None.
Description of how you validated changes
yarn build --fixinpackages/aws-cdk-lib.npx jest aws-lambda/test/runtime.test.ts --runInBand --coverage=false(7 tests passed).git diff --check.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license