Reputation: 6234
In an attempt to give developers the ability to write their lambda function locally, then commit and push to git, we used SAM and SAM Local.
We have about 50 lambda functions and anticipate this number to grow into the hundreds if not thousands.
I'm wondering how to group the lambda functions repositories i.e should we group all the lambda functions that get triggered by api gateway in their own repo, then all the ones that get triggered by s3 separately etc ...
The challenge is some lambda functions have their own dependencies and it just looks weird to try and have multiple lambdas with different dependencies within same repo. One lambda might have npm package dependencies, another might have python libraries dependencies, etc ... so do I git commit and git push those two lambda in their own separate repos or organize them in separate folders and push them to same repo? Or have separe repos per lambda function?
It doesn't seem feasible to commit each lambda to its own repo especially as the number of those functions grow overtime.
I'm new to aws tools and would appreciate someone's insights on this!
Maybe you've ran into this problem before?
Upvotes: 10
Views: 3806
Reputation: 16037
I would group them according to their purpose. For example,
I'd also recommend tools such as serverless-framework
to help manage each project.
Upvotes: 3