Hi,
After an amazing experience with Serverless Framework + AWS IoT + DynamoDB I decided to migrate an old platform with more than 50.000 users to serverless.
In this case I need to use RDS. My architecture is the following:
services
/authorizer
/database
...
/models
handler.js
db.js
serverless.yml
/users
handler.js
serverless.yml
I need to load my db module inside every microservice (like users) to interact with the database but I can’t load the module doing this:
const connectToDatabase = require('../database/db');
So what is the best practice?
Thank you!