Micro Services and node_modules

aws

#1

I’m in the process of porting a Firebase project to AWS and decided to use Serverless to manage the API and database. Due to the size of the project (and the 200 resource limit on CloudFormation), we are having to split the system into several smaller services. While that in itself is obviously an inconvenience, it poses a particular problem in regards to managing our node_modules. Our desired file structure is as follows:

/events
---> serverless.yml
---> {...lambdaFunctionHandlers.js}
/news
---> serverless.yml
---> {...lambdaFunctionHandlers.js}
/users
---> serverless.yml
---> {...lambdaFunctionHandlers.js}
package.json
/node_modules

Using this approach we only have to manage our dependencies in one place rather than once for each service. As we anticipate 15+ services, this would definitely be the easier way for us to manage things, but I’m not entirely sure if this approach is achievable/feasible?