Skip to main content

Multi-branch CodePipeline strategy with event-driven architecture

· One min read

A solution for automated pipelines creation in AWS CodePipeline when a new branch is created in an AWS CodeCommit repo.

In this solution, a CloudWatch Events rule monitors create and delete branches events in all repos, triggering a Lambda function. This Lambda function deploys a new CloudFormation stack based on a template. This template is hosted in an S3 bucket. Since the entire environment is created using Infrastructure as Code and the template is the same for all pipelines, there is no possibility of different configuration issues between environments and pipeline stages.

Full text

Architecture#

Code#

https://github.com/aws-samples/aws-codepipeline-multi-branch-strategy

github star: 17

Services:#

CodePipeline | Lambda | CloudWatch