building-a-serverless-api-with-nodejs-and-aws-aurora-serverless
building-a-serverless-api-with-nodejs-and-aws-aurora-serverless copied to clipboard
Cannot connect to DB locally
Hi @adnanrahic ,
In your tut you're able to run your functions locally and connect to the DB. I'm unable to, so I was wondering if you're doing anything special to achieve this?
When I deploy the function I'm able to connect to the DB.
Thanks 🤔
Ditto on this matter
Yo @antonhalim so my work around for this is as follows:
- I have a regular RDS MYSQL instance that falls under the free tier for when I'm developing locally.
- Then I use Aurora serverless for when I ship my app into
dev
andprod
. - So theoretically speaking I have three databases in total for
local
,dev
andprod
stages.
Also whatever ORM he was using was giving me issues so I just ended up using Serverless MYSQL
Lastly, if you wanna make raw queries to the regular RDS instance I use MYSQLWorkbench