You need a zip file in the root folder to initialise the lambda when you terraform apply
Once terraform is deployed any push to the master of the circles-lambdas repo run the codepipeline
Versioning is not supported
There is 2 build stages in the pipeline, one for making the zip out of the script buildspec_build.yml and one for deploying the lamda function buildspec_deploy.yml
This is not modular, but you can deploy different lambdas using terraform apply and then providing the lambda_function_name - so the terraform stuff could just be copied to another folder and run for any further lamdas - in any case you need a different pipeline for each function so we either leverage the count attribute and supply an array of function names or we just have separate terraform states for each.
Some caveats about this build:
terraform apply
circles-lambdas
repo run the codepipelinebuildspec_build.yml
and one for deploying the lamda functionbuildspec_deploy.yml
lambda_function_name
- so the terraform stuff could just be copied to another folder and run for any further lamdas - in any case you need a different pipeline for each function so we either leverage thecount
attribute and supply an array of function names or we just have separate terraform states for each.