Prisma Client could not locate the Query Engine for my runtime on AWS
guys im deploying prisma to a lambda on AWS with
arch="arm_64"
in my prisma schema i have this:
however once deployed im getting this error:
anyone know what it might be? i would like to use 3.0.x
, it works with 1.0.x
but not 3.0.x
๐ฎ3 Replies
Hi @sommeeeR
For AWS Lambda with Node.js 20+, you should be using
rhel-openssl-3.0.x
as the binary target, not linux-arm64-openssl-3.0.x
. See the docs. For AWS Lambda with Node.js 16 and 18, you should be using rhel-openssl-1.0.x
.
Can you try the following?
1. First, make sure you're using the correct Node.js version for your Lambda function. If you're using Node.js 20+, update your schema.prisma file to:
2. After making this change, run prisma generate again.
3. If you still have issues, try adding both versions to your binaryTargets then run prisma generate again.
Deploy your application using Prisma ORM to AWS Lambda | Prisma Doc...
Learn how to deploy your Prisma ORM-backed applications to AWS Lambda with AWS SAM, Serverless Framework, or SST
as stated in my initial post im using
arm_64
as architecture on these lambdas btw.
probably need node > 20 for linux-arm64-openssl-3.0.x
, i guess?
gonna check what node versions those lambdas are at ๐
alright so i was using node 18 for some of my lambdas, but 20 for others. this made the binary target not reliable. after setting them all to 20.x.x
i could use linux-arm64-openssl-3.0.x
and it would work
thanks for the help! ๐Youโre welcome