rehanvdm
cdk-express-pipeline
TypeScript

CDK Express Pipelines is a library built on the AWS CDK, allowing you to define pipelines in a CDK-native method. It leverages the CDK CLI to compute and deploy the correct dependency graph between Waves, Stages, and Stacks using the .addDependency method, making it build-system agnostic and an alternative to AWS CDK Pipelines.

Last updated Jun 22, 2026
65
Stars
2
Forks
7
Issues
0
Stars/day
Attention Score
51
Language breakdown
No language data available.
โ–ธ Files click to expand
README

CDK Express Pipeline

npm version PyPI version

[!IMPORTANT]
Full documentation is available at https://rehanvdm.github.io/cdk-express-pipeline/.

What is CDK Express Pipeline?

CDK Express Pipeline is a library built on the AWS CDK, allowing you to define pipelines in a CDK-native method. It leverages the CDK CLI to compute and deploy the correct dependency graph between Waves, Stages, and Stacks using the .addDependency method, making it build-system agnostic and an alternative to AWS CDK Pipelines.

Key Features

  • Build System Agnostic: Works on any system for example your local machine, GitHub, GitLab, etc.
  • Waves and Stages: Define your pipeline structure using Waves and Stages
  • Uses CDK CLI: Uses the cdk deploy command to deploy your stacks
  • Multi Account and Multi Region: Supports deployments across multiple accounts and regions mad possible by cdk bootstrap
  • Fast Deployments: Make use of concurrent/parallel Stack deployments
  • Multi-Language Support: Supports TS and Python CDK
  • Generated Mermaid Diagrams: Generates diagrams for your pipeline structure
  • Generated CI Workflows: Generates CI workflows for your pipeline (only GitHub Actions supported for now, others welcome)

Quick Start

npm install cdk-express-pipeline

Let's illustrate a common patten, deploying infra stacks before application stacks. The IamStack is only in the us-east-1 region, while the NetworkingStack is in both us-east-1 and eu-west-1.

The application stacks AppAStack and AppBStack depend on the networking stack and are deployed in both regions. The AppBStack also depends on the AppAStack.

//bin/your-app.ts
const app = new App();
const expressPipeline = new CdkExpressPipeline();

const regions = ['us-east-1', 'eu-west-1'];

const infraWave = expressPipeline.addWave('Infra'); const infraWaveUsEast1Stage = infraWave.addStage('us-east-1'); const infraWaveEuWest1Stage = infraWave.addStage('eu-west-1'); new IamStack(app, 'Iam', infraWaveUsEast1Stage); new NetworkingStack(app, 'Networking', infraWaveUsEast1Stage); new NetworkingStack(app, 'Networking', infraWaveEuWest1Stage);

const appWave = expressPipeline.addWave('Application'); for (const region of regions) { const appWaveStage = appWave.addStage(region); const appA = new AppAStack(app, 'AppA', appWaveStage); const appB = new AppBStack(app, 'AppB', appWaveStage); appB.addExpressDependency(appA); }

expressPipeline.synth([ infraWave, appWave, ], true, {});

Running cdk deploy '**' --concurrency 10 will deploy all stacks in the correct order based on their dependencies. This is indicated on the CLI output:

ORDER OF DEPLOYMENT
๐ŸŒŠ Waves  - Deployed sequentially.
๐Ÿ— Stages - Deployed in parallel by default, unless the wave is marked [Seq ๐Ÿ—] for sequential stage execution.
๐Ÿ“ฆ Stacks - Deployed after their dependent stacks within the stage (dependencies shown below them with โ†ณ).
           - Lines prefixed with a pipe (|) indicate stacks matching the CDK pattern.
           - Stack deployment order within the stage is shown in square brackets (ex: [1])

| ๐ŸŒŠ Infra | ๐Ÿ— us-east-1 | ๐Ÿ“ฆ Iam (Infraus-east-1Iam) [1] | ๐Ÿ“ฆ Networking (Infraus-east-1Networking) [1] | ๐Ÿ— eu-west-1 | ๐Ÿ“ฆ Networking (Infraeu-west-1Networking) [1] | ๐ŸŒŠ Application | ๐Ÿ— us-east-1 | ๐Ÿ“ฆ AppA (Applicationus-east-1AppA) [1] | ๐Ÿ“ฆ AppB (Applicationus-east-1AppB) [2] | โ†ณ AppA | ๐Ÿ— eu-west-1 | ๐Ÿ“ฆ AppA (Applicationeu-west-1AppA) [1] | ๐Ÿ“ฆ AppB (Applicationeu-west-1AppB) [2] | โ†ณ AppA

A Mermaid diagram of the pipeline is saved to ./pipeline-deployment-order.md automatically:

graph TD
    subgraph Wave0["๐ŸŒŠ Infra"]
        subgraph Wave0Stage0["๐Ÿ— us-east-1"]
            StackInfrauseast1Iam["๐Ÿ“ฆ Iam [1]"]
            StackInfrauseast1Networking["๐Ÿ“ฆ Networking [1]"]
        end
        subgraph Wave0Stage1["๐Ÿ— eu-west-1"]
            StackInfraeuwest1Networking["๐Ÿ“ฆ Networking [1]"]
        end
    end
    subgraph Wave1["๐ŸŒŠ Application"]
        subgraph Wave1Stage0["๐Ÿ— us-east-1"]
            StackApplicationuseast1AppA["๐Ÿ“ฆ AppA [1]"]
            StackApplicationuseast1AppB["๐Ÿ“ฆ AppB [2]"]
        end
        subgraph Wave1Stage1["๐Ÿ— eu-west-1"]
            StackApplicationeuwest1AppA["๐Ÿ“ฆ AppA [1]"]
            StackApplicationeuwest1AppB["๐Ÿ“ฆ AppB [2]"]
        end
    end
    StackApplicationuseast1AppA --> StackApplicationuseast1AppB
    StackApplicationeuwest1AppA --> StackApplicationeuwest1AppB
    Wave0 --> Wave1

CDK Express Pipeline is build system agnostic, meaning you can run the cdk deploy command from any environment, such as your local machine, GitHub Actions, GitLab CI, etc. It includes a function to generate GitHub Actions workflow, more build systems can be added as needed.

Next Steps

[!IMPORTANT]
Full documentation is available at https://rehanvdm.github.io/cdk-express-pipeline/.
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท rehanvdm/cdk-express-pipeline ยท Updated daily from GitHub