anyone has a working example of getting Prisma up ...
# orm-help
a
anyone has a working example of getting Prisma up and running against AWS Aurora Serverless with CDK? Can not get it work, it does not connect within the VPC 🥲
s
Are you using a Lambda function that is also inside your VPC?
a
yes, i am. adding a lot of setup as the default function props, to include the lambda in a VPC. the whole setup is from @Ryan’s example repo: https://github.com/ryands17/graphql-api-cdk-serverless-postgres/blob/main/lib/appsync-cdk-rds-stack.ts The only difference is I do not use AppSync, I use API Gateway
Could this be the problem? @Ryan We only have an IAM for accessing SM, but not Aurora Serverless, do we need to an IAM to RDS as well?
s
What is the exact error returned? Is the problem happening between API Gateway and Lambda, OR between Lambda and RDS? Maybe share a link to your full CDK file, so it’ll be easier to help with the issue.
a
Thanks. The file is pretty large… 😂 let me make it clear, by making a minimal example
So, I got it working by ditching prisma….interesting, do not why prisma can not connect while some low level raw SQL lib can connect and doing query with the same setup
r
IAM isn’t needed. Could you share the CloudWatch logs with
DEBUG=*
enabled? That might give a better insight on the issue.
Also what is the lambda function timeout that you have set?
a
@Ryan Where should I add the
DEBUG=*
? The timeout is 10sec. 🙂