What is the prefered way to share code between AWS Lambda functions?
I have a structure like this:
- functions
- a
- node_modules
- index.js
- package.json
- b
- node_modules
- index.js
- package.json
- c
- node_modules
- index.js
- package.json
This lets every function keep its own node_modules and I can package the whole thing with the CLI.
But what about custom code that needs to be shared?
I can require("../mylibrary") but the package command would still not include it.