CI/CD Pipeline (CDK Pipelines)
intermediateSelf-mutating CDK Pipeline connected to a GitHub repository via CodeStar Connection. Deploys through Staging and Production stages with manual approval and a smoke test step.
Quick Start
Via CLI (recommended)
npx cdk-starter create Then select "CI/CD Pipeline (CDK Pipelines)" from the prompt
Or scaffold directly
npx cdk-starter create --starter cicd-pipeline README
CI/CD Pipeline (CDK Pipelines)
Self-mutating CDK Pipeline connected to GitHub via AWS CodeStar Connections. Deploys through Staging and Production stages with manual approval.
Setup
Create a GitHub connection in the AWS Console: https://console.aws.amazon.com/codesuite/settings/connections
Set environment variables:
export GITHUB_CONNECTION_ARN=arn:aws:codestar-connections:...
export GITHUB_OWNER=your-github-org
export GITHUB_REPO=your-repo-name
Replace
lib/stages/app-stage.tswith your real application stacks.Deploy the pipeline (only needed once — it self-updates after that):
npx cdk deploy
Prerequisites
- Node.js ≥ 20
- AWS CLI configured (
aws configure) - CDK bootstrapped (
npx cdk bootstrap)
Deploy
npm install
npx cdk diff
npx cdk deploy
Tear down
npx cdk destroy