I want to create a lambda function that runs migra...
# orm-help
m
I want to create a lambda function that runs migrations. I'm not using Serverless. How do I run
migrate deploy
programmatically? Looks like maybe I want to use https://github.com/prisma/prisma/blob/master/src/packages/migrate/src/Migrate.ts ?
j
a lambda function that runs migrations. I'm not using Serverless.
Can you define that please?
m
I have an app built around AWS lambda. I want to run my prisma migrations in AWS. I'm not using the Serverless Framework
my idea is to do something similar to https://github.com/prisma/prisma/blob/master/src/packages/migrate/src/commands/MigrateDeploy.ts but in a lambda function, then simply invoke that function to run migrations
is there a better way?
j
Ah, Serverless Framework. I was confused as Lambda is Serverless by definition.
We do not have programmatic access to Migrate yet indeed, so you will have to build something for yourself. If you can call the CLI somehow that will be easier, but the Lambda file size upload limit will make this difficult.
m
yeah the naming is a bit unfortunate