1

so we have a pipeline that zips code functions for our Lambda, uploads it to S3 and builds the every lambda we have again with new version of zipped codes.

Now, the problem is, every single Lambda is being Built every pipeline run. even if there are no changes to other lambda code function. ex. (only 1 of 10 lambda has code change)

What would be the best approach or checking that we need to add in our pipeline in order to build the only Lambda that has code change? open for any suggestions even creating new pipeline and breaking this lambdas into pieces

2
  • You have multiple lambda functions and the codepipeline is used for building and deploying them on AWS? Commented Aug 6, 2021 at 4:06
  • @Chetan yes, all functions in 1 codecommit, Commented Aug 6, 2021 at 10:17

2 Answers 2

1

I think the best way is to add a stage before the zipfile to see with files changes in the code in the last merge.

Simply take those names and check which lambda was affected.

Then it will pass the list of lambdas need to redeploy.

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

Comments

0

What we do at our company is have a single pipeline per lambda / repo. We have a few mono repos that when they deploy they deploy all the lambdas in that repo at once but still through a single pipeline. If you concerned about cost in the pipeline sticking around you could always delete them and then have another job to recreate them when you need to feploy a new change.

We've got everything done through cloud formation scripts so it's all simple scripts running here and there to create pipelines.

Curious what is the reason to have one pipeline deploy all 10 lambdas?

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.