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?

preguntada hace 2 años663 visualizaciones
2 Respuestas
1
Respuesta aceptada

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
respondido hace 2 años
  • 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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas