I am looking to deploy a Laravel
app on AWS Lambda
. The app requires a PostgreSQL
database access.
The idea is am using Bref
to deploy on AWS Lambda. I created a RDS PostgreSQL database manually and updated the inbound rule and added the connection parameter to the .env file and serverless.yml template in the app.
After deploying the app I am receiving error SQLSTATE[42P01]: Undefined table
. I belive the problem is that no migration occurred. So the question is how to migrate from Laravel/Lambda to RDS? Shall I use the artisan and the CLI? Or there is a way to create an automated way to migrate?
Thanks
When you don't make a custom setting for Postgresql, by default the sql queries should be like this
There are two options or you should specify the table names in all your laravel model files as below
or you should connect to rds postgresql via terminal and set the following
postgresql schemas