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?

gefragt vor 2 Jahren663 Aufrufe
2 Antworten
1
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
  • 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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen