Let’s say I have monolithic app on Heroku that run...
# orm-help
p
Let’s say I have monolithic app on Heroku that runs Prisma with Postgres. I’d like to start using AWS Lambdas side-by-side (deployed with Serverless Framework) and access my database. How would you do that? Are out there any guides or examples?
r
@Patrick 👋 Simply deploying Lambda using the Serverless framework should work in this case. Just make sure your Lambda can connect to RDS via security groups if RDS is not publicly accessible.
p
Hey Ryan, yes, but I already have schema defined in my monolithic app. I would like a monolithic app to handle migrations etc., and in the Lambdas — simply have access to prisma client — with type suggestions and so on. I’m not sure if that makes sense?
r
In that case, you would need to share the
schema.prisma
somehow with Lambda as it would need to generate the types based on the schema.
p
Gotcha, like with private npm package or just throw the whole thing to monorepo?
r
Yeah any one would do. Monorepo would actually be easier imo.
👍 1
p
Yep, thanks!
👍 1