Search code examples
amazon-web-servicesaws-lambdaaws-cloudformationaws-codepipeline

How to to deploy AWS lambda using CodePipleline?


In this world of CICD,I have a lambda function ( written in typescript) and presently in Github. My IDE is vscode. I can do my development and push my change's to Github. I want that when I push my changes to github, the Lambda function should be deployed to my AWS account using Codebuild and codePipeline. I can create the codestar connection. Can anyone help me with this ?

It should be simple - I push my changes, and then the Lambda should be deployed - correct ?

My google search did not give me any how to solutions ?

Appreciate your help !


Solution

  • You should use a CloudFormation actions of "Create Or Update Stack". These articles present a good examples:

    https://medium.com/hatchsoftware/setting-up-ci-cd-for-lambda-functions-using-aws-codepipeline-880567769dde

    https://blog.clairvoyantsoft.com/continuous-deployment-of-lambda-functions-f5d930d1937d

    https://www.linkedin.com/pulse/building-cicd-pipeline-lambda-function-aws-using-aliaksandr-liakh/