Skip to content

Conversation

@dsilbergleithcu-godaddy
Copy link
Contributor

Latest version as of current date.

Fixes missing package for 1.1.30 when building on graviton instances

Issue # (if applicable)

Closes #35534.

Reason for this change

The aws-lambda-nodejs construct fails Docker bundling on ARM64 architectures (AWS Graviton instances) because bun@1.1.30 is missing the required @oven/bun-linux-aarch64 package. This causes npm to fail when trying to install bun during the Docker build process, with the error:

npm error Failed to find package "@oven/bun-linux-x64-baseline"

Description of changes

Bumped bun from version 1.1.30 to 1.2.23 in packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile.

This addresses the issue because bun@1.2.23 includes proper ARM64 support via optional dependencies:

  • @oven/bun-linux-aarch64
  • @oven/bun-linux-aarch64-musl

Why this approach: This is a simpler solution than alternatives (such as switching to the curl-based bun installer) because:

  1. Maintains consistency with the existing npm-based installation pattern used for other package managers (yarn, pnpm) in the same Dockerfile
  2. Reduces supply chain risk by not introducing additional external dependencies (bun.sh installer endpoint)
  3. Minimal change - just a version bump

Alternatives considered:

  • Using the official bun installer script via curl - rejected due to added supply chain risk and deviation from existing patterns
  • Platform-specific conditional installation - rejected as unnecessarily complex when a version bump suffices

Describe any new or updated permissions being added

None. This change only updates a package version.

Description of how you validated changes

Verified that bun@1.2.23 includes the required ARM64 packages:

$ npm view bun@1.2.23 optionalDependencies
{
  "@oven/bun-linux-aarch64": "1.2.23",
  "@oven/bun-linux-aarch64-musl": "1.2.23",
  ...
}

Checklist


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

Latest version as of current date.

Fixes missing package for 1.1.30 when building on graviton instances
@aws-cdk-automation aws-cdk-automation requested a review from a team October 8, 2025 19:23
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Oct 8, 2025
@dsilbergleithcu-godaddy
Copy link
Contributor Author

@pahud this follows on the work from here: #35535

Similarly, this should pass tests without any changes to the tests

Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

(This review is outdated)

@dsilbergleithcu-godaddy dsilbergleithcu-godaddy changed the title fix(aws-lambda-nodejs): bump bun to 1.2.23 for ARM64 support fix(lambda-nodejs): bump bun to 1.2.23 for ARM64 support Oct 8, 2025
@dsilbergleithcu-godaddy
Copy link
Contributor Author

Exemption request:

We don't need to change tests here. In fact, we don't want to. We want to make sure it still passes any existing tests.

@aws-cdk-automation aws-cdk-automation added pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Oct 8, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Oct 9, 2025
@Abogical Abogical added pr-linter/exempt-test The PR linter will not require test changes pr-linter/exempt-integ-test The PR linter will not require integ test changes labels Oct 10, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review October 10, 2025 08:30

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@mergify
Copy link
Contributor

mergify bot commented Oct 10, 2025

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).

@mergify mergify bot added the queued label Oct 10, 2025
@mergify mergify bot merged commit 3aa186c into aws:main Oct 10, 2025
33 of 34 checks passed
@mergify mergify bot removed the queued label Oct 10, 2025
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes pr-linter/exempt-test The PR linter will not require test changes pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aws-lambda-nodejs: Docker bundling fails with bun on ARM64 architecture - @oven/bun-linux-x64-baseline not found

3 participants