Documentation is missing, Documentation is confusing
What is the issue?
I discovered that the AWS Linux 2 custom runtime (for Bun to execute both TS or JS files) lambda function ONLY WORKS if the architecture is arm64.
If the lambda uses the x86_64 architecture, the following error occurs on any and all function invocations:
/opt/bootstrap: line 3: /opt/bun: cannot execute binary file
/opt/bootstrap: line 3: /opt/bun: Success
INIT_REPORT Init Duration: 14.31 ms Phase: init Status: error Error Type: Runtime.ExitError
Please update the documentation for AWS Lambda + Bun to clearly define that the lambda function's architecture MUST be arm64 and the lambda layer MUST support arm64 architectures on Amazon Linux 2 custom runtimes.
Ian
Where did you find it?
Create AWS Lambda function with custom Amazon Linux 2 runtime and x86_64 architecture
Upload or attach Bun v1.0.2 lambda layer (which by default is compatible with both x86_64 and arm64)
Deploy example/lambda.ts file in bun-lambda folder
Enable function URL or click Test
Verify logs display opt/bootstrap errors and function fails to execute
Change function architecture to arm64
Test via function URL or click Test
Verify logs do NOT display error and function invokes properly
What is the type of issue?
Documentation is missing, Documentation is confusing
What is the issue?
I discovered that the AWS Linux 2 custom runtime (for Bun to execute both TS or JS files) lambda function ONLY WORKS if the architecture is arm64.
If the lambda uses the x86_64 architecture, the following error occurs on any and all function invocations:
Please update the documentation for AWS Lambda + Bun to clearly define that the lambda function's architecture MUST be arm64 and the lambda layer MUST support arm64 architectures on Amazon Linux 2 custom runtimes.
Ian
Where did you find it?
opt/bootstrap
errors and function fails to execute