0

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 !

1
  • If you're able to package your application using the [Serverless Application Model], an approach would be to execute SAM commands inside a CodeBuild container. The OutputArtifacts in the CodePipeline of that container could be deployed using the CloudFormation Provider in CodePipeline (i.e. sam deploy) Commented Feb 14, 2022 at 13:47

2 Answers 2

1

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/

Sign up to request clarification or add additional context in comments.

1 Comment

ty, these are helpful as I am making progress. some issues with my buildspec file but I should be figure out
0

Here is a sample of using CodeBuild to deploy Lambda function. And you can set up a webhook for a CodeBuild project to continuously deploy new Lambda functions on every github change

https://docs.aws.amazon.com/codebuild/latest/userguide/sample-lambda-sam-gradle.html#sample-lambda-sam-gradle.set-up-buildspec

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.