From a7d99d3bec18c35421d7edffe032a76c67d2ccc7 Mon Sep 17 00:00:00 2001 From: Damian Silbergleith <78872820+dsilbergleithcu-godaddy@users.noreply.github.com> Date: Fri, 19 Sep 2025 17:00:21 -0700 Subject: [PATCH 1/2] fix(aws-lambda-nodejs): use official bun installer for ARM64 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace npm-based bun installation with official installer to fix Docker bundling failures on ARM64 architectures (AWS Graviton). The npm package @oven/bun-linux-x64-baseline doesn't exist for ARM64, causing builds to fail on Graviton instances. The official bun installer automatically detects and downloads the correct platform binary. Fixes #35534 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile index cf89a7b2c3a5a..0372d31dd0ed4 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile @@ -9,8 +9,12 @@ RUN npm install --global yarn@1.22.5 # Install pnpm RUN npm install --global pnpm@7.33.7 -# Install bun -RUN npm install --global bun@1.1.30 +# Install bun using official installer instead of npm (fixes ARM64 compatibility) +# CDK's original: RUN npm install --global bun@1.1.30 +# Issue: @oven/bun-linux-x64-baseline npm package doesn't exist for ARM64 +# Solution: Use official installer that downloads correct platform binary +RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.1.30" && \ + ln -s /root/.bun/bin/bun /usr/local/bin/bun # Install typescript RUN npm install --global typescript From c881a0b8f6d5044eb2d9d132a5074b704e5fee55 Mon Sep 17 00:00:00 2001 From: Damian Silbergleith <78872820+dsilbergleithcu-godaddy@users.noreply.github.com> Date: Wed, 8 Oct 2025 10:35:54 -0700 Subject: [PATCH 2/2] chore: Bump bun package version --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile index 0372d31dd0ed4..1d11c7ce55125 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile @@ -9,12 +9,8 @@ RUN npm install --global yarn@1.22.5 # Install pnpm RUN npm install --global pnpm@7.33.7 -# Install bun using official installer instead of npm (fixes ARM64 compatibility) -# CDK's original: RUN npm install --global bun@1.1.30 -# Issue: @oven/bun-linux-x64-baseline npm package doesn't exist for ARM64 -# Solution: Use official installer that downloads correct platform binary -RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.1.30" && \ - ln -s /root/.bun/bin/bun /usr/local/bin/bun +# Install bun +RUN npm install --global bun@1.2.23 # Install typescript RUN npm install --global typescript