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?
Lambda allows you to publish one or more immutable versions for individual Lambda functions; such that previous versions cannot be changed. Each Lambda function version has a unique Amazon Resource Name (ARN) and new version changes are auditable as they are recorded in CloudTrail .
You can create one or more aliases for your Lambda function. A Lambda alias is like a pointer to a specific function version. Users can access the function version using the alias Amazon Resource Name (ARN).
I would group them according to their purpose. For example,
I'd also recommend tools such as serverless-framework
to help manage each project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With