Hi guys, I am trying to deploy a Next.js app to Aw...
# orm-help
m
Hi guys, I am trying to deploy a Next.js app to Aws Amplify. I am using Prisma and graphql into the api routes of next.js. Every time Prisma client is used on an api route, I get 503 from cloud front. On vercel, I don't have any of these problems. There is any configuration that I am missing for make working Prisma client on AWS Amplify hosting?
r
What do the Lambda logs say where Prisma is deployed?
m
Hi Ryan, I am getting “Error: Query engine binary for current platform \"rhel-openssl-1.0.x\" could not be found.
And ERROR PrismaClientInitializationError2 [PrismaClientInitializationError]: Query engine binary for current platform "rhel-openssl-1.0.x" could not be foun
The stack is: Next.js + Nexus + prism + Apollo micro + codegen The generator client actually is: generator client { provider = "prisma-client-js" binaryTargets = ["native", "rhel-openssl-1.0.x"] }
r
Does the Lambda function bundle locally?
m
No, I am using https://aws.amazon.com/it/amplify/hosting/ And I don't make or create lambdas locally, they create them on deploy (I think)
r
Try any one or both of these steps and see if ic works: 1. Just keep a single binary target
rhel-openssl-1.0.x
and remove native. 2. Try running
prisma generate
during the build process if possible so that the binary is deployed as well.
m
Ok prism generate I run before or after build? Or during? Because actually I am.running it on postbuild
r
Yeah
postbuild
is fine.
m
I remove native, but I have the same error
Actually I am trying to run prism generate on rebuild command
My prism client version is 2.23.0
Ok is not working