7

I'm a kind of lost in the documentation. I want to push Python code to a repo and use CodePipeline to deploy Lambdas. I have CodeCommit repo, CodePipeline - so far this works and I can create/update CF stack to create supplementary resources.

I know AWS SAM can be used to deploy the functions using CF tpl, but how can I connect SAM with CodePipeline/CodeDeploy? The code should be taken from a 'source' pipeline action then deployed as lambda function.

If SAM isn't the best automated solution here then what should I use instead? Pipeline is the key requirement so we don't have to run something like aws cf update-stack manually, just push the code.

2 Answers 2

5

CodePipeline doesn't support deploying Lambda through CodeDeploy, so the approach is to use a CodeBuild Build action to generate an change set from the SAM template and feed it into a CloudFormation Deploy action. You can find a detailed instruction in the following doc.

https://docs.aws.amazon.com/lambda/latest/dg/build-pipeline.html

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

Comments

1

If you use SAM to deploy Lambdas, CodeDeploy is automatically used. For reference:

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.