feat: x86_64 builds via LAMBDA_ARCH, one-command jolt demo - #2
Merged
Merged
Conversation
`jolt image` was pinned to linux/arm64, which fails with `exec format error` on an x86_64 Linux Docker host without qemu, and `jolt deploy` always created an arm64 function. - LAMBDA_ARCH=x86_64 (or amd64) builds under linux/amd64. arm64 stays the default. - deploy reads the architecture from dist/bootstrap's ELF header and passes --architectures on both create and update, so it always matches the last build and can switch an existing function. - `jolt demo` runs image, deploy and invoke in order, after checking tools, AWS credentials and region, Docker access, and that Docker can run containers for the target platform. Verified end to end on x86_64 Linux: built, deployed to provided.al2023 x86_64 in us-west-2, and invoked successfully. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsPjhLv9dHzRwCbxB81Wco
burinc
approved these changes
Sep 11, 2026
burinc
added a commit
that referenced
this pull request
Sep 11, 2026
PR #2 (merged today) updated README's quickstart, al2023-build.md, and CHANGELOG.md for LAMBDA_ARCH/jolt demo, but missed four spots: - architecture.md's whole-flow diagram still said the Lambda function was unconditionally arm64, and never mentioned jolt demo at all. - README's own "How it works" diagram had the same unconditional-arm64 label. - Both contributing docs' PR checklist asked what memory tier a change to aws_lifecycle.clj/bench_run.clj was tested against, but not which architecture, even though aws_lifecycle.clj now reads --architectures off the built binary's ELF header rather than a hardcoded string. Rebuilt docs/site.edn locally (bb site:build) to confirm the diagram still renders and no template variable broke.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
jolt imagewas pinned tolinux/arm64. On an x86_64 Linux Docker host without qemu, the firstRUNfails withexec /bin/sh: exec format error. Andjolt deployalways created anarm64function, so an x86_64 binary couldn't be deployed even if you built one by hand.What
LAMBDA_ARCH(bb.edn):jolt imagebuilds underlinux/amd64whenLAMBDA_ARCH=x86_64(oramd64).arm64stays the default; any other value exits before Docker runs.script/aws_lifecycle.clj): reads the architecture fromdist/bootstrap's ELF header and passes--architectureson bothcreate-functionandupdate-function-code. A deploy always matches the last build, and switching an existing function's architecture works.jolt demo(script/demo.clj): runsimage,deployandinvokein order. It first checksdocker/awsare on PATH, AWS region and credentials (printing the target account), Docker daemon access, and that Docker can run containers for the target platform, so a missing piece stops it before the build or any AWS change.al2023-build.md(arm64 and x86_64, the emulator requirement),getting-started.md, CHANGELOG. Drops "x86_64 builds" from the README's extension points.No changes to the Dockerfile, the runtime, or the handler.
Testing
jolt test: 5 tests, 0 failures.jolt demoend to end on x86_64 Linux (LAMBDA_ARCH=x86_64): built, deployed a newprovided.al2023x86_64 function in us-west-2, invoked successfully (init 935 ms, 311 MB used).jolt demoprerequisite check triggered and printed its fix: missingaws, no region, no credentials, Docker permission denied, badLAMBDA_ARCH.bootstrap-archagainst a real x86_64 binary, a synthetic arm64 ELF header, and a rejected 32-bit ARM header.Not exercised: the arm64 path on this branch (no arm64 host or emulator), and
update-function-codeswitching an existing function's architecture.jolt probewasn't run:joltcisn't installed on the test machine. This PR doesn't touch the probe, the runtime, or the mock.🤖 Generated with Claude Code
https://claude.ai/code/session_01CsPjhLv9dHzRwCbxB81Wco