INCIDENT RUNBOOK
Fix: Prisma Engine Binary Missing In Alpine in Express on AWS Lambda
Comprehensive architectural post-mortem and verified configuration patch for express deployed in aws lambda production environments.
Automated Remediation ProtocolUpdated for 2026 Production
Facing prisma-engine-binary-missing-in-alpine in CI/CD or runtime containers?
Review the verified configuration patches below. To automate incident triage and fine-tune your own internal agents, check out our production AI training datasets.
● Observed Terminal Error / Stack Trace
Error: /var/task/node_modules/@prisma/cli/bin/prisma: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:928:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/var/task/index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)Root Cause Analysis
The Prisma Engine binary is compiled for a different architecture or operating system than the one used by AWS Lambda's Alpine-based runtime environment, resulting in a runtime incompatibility. This is due to the fact that AWS Lambda's Alpine environment has a different set of dependencies and libraries than the environment where the Prisma Engine binary was compiled, leading to a mismatch in the expected runtime environment.
● Configuration & Code Resolution
Add the following lines to your `package.json` file:
"scripts": {
"build": "prisma generate && npm run build:lambda"
},
"install": "npm install --platform=linux --arch=x64 prisma"
And update your `lambda.function.js` file to include the following code:
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
Then, update your `Dockerfile` to include the following lines:
FROM public.ecr.aws/lambda/nodejs:14
RUN npm install --platform=linux --arch=x64
This will ensure that the Prisma Engine binary is compiled for the correct architecture and operating system, and that the necessary dependencies are installed.Verification & Build Command
aws lambda invoke --function-name your-lambda-function response.json && cat response.json