Deploy lambdas in parallel with CodeBuild

0

I have a CodePipeline configured with my single GitHub repo to trigger build & deploy on any commit.

My repo contains dozens of individual lambda functions.

The pre_build step does a full clean & restore. Then in the build step, I have a long list of commands like this:

- dotnet build -c Debug
- cd folder1
- dotnet lambda deploy-function --configuration Debug --region $Region --config-file aws-lambda-tools-test.json
- cd ../folder2
- dotnet lambda deploy-function --configuration Debug --region $Region --config-file aws-lambda-tools-test.json
- cd ../folder3
- dotnet lambda deploy-function --configuration Debug --region $Region --config-file aws-lambda-tools-test.json

My question is, is there any way for me to execute these deployments in parallel?

已提問 2 年前檢視次數 663 次
2 個答案
1
已接受的答案

CodeBuild batch support a matrix build where a build matrix defines tasks with different configurations that run in parallel. CodeBuild creates a separate build for each possible configuration combination.

Consider extending your pipeline to include CodeDeploy which supports deployment groups for grouping AWS Lambda functions in a CodeDeploy deployment.

RoB
已回答 2 年前
  • Matrix build (and the other options outlined in that linked doc) is what I was looking for. Thanks.

-3

I would suggest to pick CodeBuild compute type to support the required parallelism, and then use a Makefile with parallel execution.

AWS
Alex_P
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南