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回答
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ