johncam94
johncam94
PPrisma
Created by johncam94 on 2/21/2025 in #help-and-questions
PrismaClientInitializationError Prisma Client could no locate the Query Engine rhel-openssl-3.0.x
Good day Everyone, I am currently working on a project. Where I utilize Prisma ORM with PrismaAppSync. At the moment I am simply trying to perform some prisma client queries (without AppSync) simply to test. I continuously get this error while running my AWS Lambda
Prisma Client could not locate the Query Engine for runtime \"rhel-openssl-3.0.x
Prisma Client could not locate the Query Engine for runtime \"rhel-openssl-3.0.x
I am using Amplify Gen2 (Typescript) to create my infrastructure as code. The prisma client is within a Lambda Layer. During the amplify build, I run a postinstall script
npx prisma generate --schema=./prisma/schema.prisma
npx prisma generate --schema=./prisma/schema.prisma
. Everything from the build gets redirected to the node_modules folder within my AWS Lambda Layer. AWS Lambda & Layer Runtimes = Node 20 Database Amazon Aurora (MySQL) => connection has been established and was able to query the DB using mysql2 Within schema.prisma

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}

generator appsync {
provider = "prisma-appsync"
output = "../node_modules/@prisma-appsync"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}

generator appsync {
provider = "prisma-appsync"
output = "../node_modules/@prisma-appsync"
binaryTargets = ["native", "rhel-openssl-3.0.x"]
}
When I download my Lambda layer locally. I do see the rhel-openssl-3.0.x binary files, I am not sure why prisma isn't able to locate it. Any ideas? I appreciate the help! Thanks 🙂
3 replies