P
Prismaโ€ข2w ago
sommeeeR

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:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-arm64-openssl-3.0.x"]
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-arm64-openssl-3.0.x"]
}
however once deployed im getting this error:
Prisma Client could not locate the Query Engine for runtime "linux-arm64-openssl-1.0.x".

This happened because Prisma Client was generated for "debian-openssl-1.1.x", but the actual deployment required "linux-arm64-openssl-1.0.x".
Add "linux-arm64-openssl-1.0.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it:

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x"]
}
Prisma Client could not locate the Query Engine for runtime "linux-arm64-openssl-1.0.x".

This happened because Prisma Client was generated for "debian-openssl-1.1.x", but the actual deployment required "linux-arm64-openssl-1.0.x".
Add "linux-arm64-openssl-1.0.x" to `binaryTargets` in the "schema.prisma" file and run `prisma generate` after saving it:

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-arm64-openssl-3.0.x", "linux-arm64-openssl-1.0.x"]
}
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
RaphaelEtim
RaphaelEtimโ€ข2w ago
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:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}
If you're using Node.js 16 or 18, use:

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}
If you're using Node.js 16 or 18, use:

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
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.
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x", "rhel-openssl-1.0.x"]
}
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x", "rhel-openssl-1.0.x"]
}
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
sommeeeR
sommeeeROPโ€ข2w ago
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! ๐Ÿ™‚
RaphaelEtim
RaphaelEtimโ€ข2w ago
Youโ€™re welcome
Want results from more Discord servers?
Add your server