CI/CD for AWS infrastructure using AWS CDK
Sythesize and deploy CloudFormation using AWS CDK.
Use template →1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
steps: - label: ":npm: install deps" command: "npm install" key: "deps" plugins: - artifacts#v1.9.3: upload: "node_modules" compressed: node_modules.tgz - label: ":jest: run tests" command: "npm test" depends_on: "deps" key: "test" plugins: - artifacts#v1.9.3: upload: "node_modules" compressed: node_modules.tgz - label: ":aws-logo: cdk synth" depends_on: "test" commands: - "npx cdk synth" plugins: - artifacts#v1.9.3: download: "node_modules" compressed: node_modules.tgz - aws-assume-role-with-web-identity: role-arn: arn:aws:iam::AWS-ACCOUNT-ID:role/SOME-ROLE - docker: image: node:latest - block: Deploy? - label: ":aws-logo: cdk deploy" commands: - "npx cdk deploy" plugins: - artifacts#v1.9.3: download: "node_modules" compressed: node_modules.tgz - aws-assume-role-with-web-identity: role-arn: arn:aws:iam::AWS-ACCOUNT-ID:role/SOME-ROLE - docker: image: node:latest
- Languages
- JavaScript
- Platforms
- AWS
- Tools
- CDK
CI/CD for AWS infrastructure using AWS CDK
This template gives you a continuous integration (CI) pipeline for testing, deploying, modifying, and destroying AWS infrastructure using AWS CDK.
At a glance:
- For AWS CDK projects
- Uses Docker with a Node.js image.
- Uses Node.js and npm
- Uses the AWS Assume Role plugin to access AWS credentials
- Deploys to AWS
How it works
This template:
- Runs tests over your CDK project
- Assumes an AWS role using the AWS Assume Role with Web Identity plugin.
- Synthesizes an AWS CloudFormation template, which is available as an artifact.
- Blocks for input before conditionally deploying/updating/deleting your stack resources to AWS.
Next steps
After you select Use template, you’ll:
- Connect the Git repository with your AWS CDK project.
- Replace the placeholder AWS role ARN in the pipeline definition.
- Configure the compute—run locally, on-premises, or in the cloud.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue , or reach out to support.