This post describes how to use the https://docs.aws.amazon.com/cdk/api/latest/docs/pipelines-readme.html to follow a Gitflow development model using https://aws.amazon.com/cdk/. CDK Pipelines are self-updating: if you add application stages or stacks, then the pipeline automatically reconfigures itself to deploy those new stages and/or stacks.

The Create Lambda function uses the https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/codebuild.html to create an https://aws.amazon.com/codebuild/ project that builds the pipeline for the feature branch.

The Destroy Lambda function creates another CodeBuild project which cleans all of the feature branch’s resources and the feature pipeline.

This post showed how you can work with an event-driven strategy and AWS CDK to implement a multi-branch pipeline flow using AWS CDK Pipelines.

Related Articles