I have approximately 10 microservices implemented as Node.js lambdas in AWS. What is the best way to manage them through git and the AWS CLI? I am currently editing them through the web interface but it is starting to be difficult to manage.
-
Are you looking for automation (DevOps) or manual updates of your Lambda function? Look into the CLI update-function-code for command line Lambda updates. There is no integration between git and cli. For a DevOps solution look at Tom Melo's answer.John Hanley– John Hanley2018-04-03 03:17:09 +00:00Commented Apr 3, 2018 at 3:17
-
Git VCS and AWS CLI are quite different tools. So you'd better decide which tool to use before asking how to manage your code.Marina Liu– Marina Liu2018-04-03 07:09:11 +00:00Commented Apr 3, 2018 at 7:09
-
Thanks John and Marina. I will check the CLI update-function-code. For now I am in manual, although to Marina's point at some point I might have to automate and stop relying on AWS CLI for pushing the codejaimerr– jaimerr2018-04-04 11:22:33 +00:00Commented Apr 4, 2018 at 11:22
3 Answers
I would very strongly suggest you to use Serverless!
It has made management and deployment so much easier for lambda architecture and additionally it also gives you ease of coding since it is a 'framework'
1 Comment
You can combine CloudFormation + CodeCommit + CodePipeline + CodeBuild for your version control and CI/CD. There's a heavy lift when using CloudFormation, but as soon as you get things up and running the process of deploying new Lambda versions becomes super easy.
1 Comment
Take a look at Vercel.
Not only can you deploy your functions with git push but the branch context is considered. For example, pushing to a PR branch creates a Preview deployment with a unique URL that represents your PR. Merging that PR to your main branch creates a Production deployment with your production domain.
There's even a free tier for Hobby projects so you can try it out yourself without any commitment.