Simplify building on AWS by adopting this CDK boilerplate for an IaC Pipeline. If you're new to AWS, this can help. It contains pre-made architectural decisions allowing you to get started quickly. Yet because it's IaC, you also have flexibility. You can easily update your architecture by pushing code modifications to your repository.
(to be added)
- a development machine with Yarn and CDK
- IAM admin with programmatic access
- if going to use CodeCommit, relevant IAM users should have credentials set up
- if going to use GitHub, access token needs to be in Secrets Manager
- Configure
cdk.context.yaml
. See Schema below. - Install the dependencies:
yarn install
npx yaml2json cdk.context.yaml > cdk.context.json
- Test that the configuration and code synthesizes properly:
cdk synth
- Bootstrap CDK in the AWS account and region to be used:
cdk bootstrap \
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
aws://<account>/<region>
- Deploy this pipeline:
cdk deploy
- If CodeCommit is created for this IaC code, connect the local to the remote repo.
CDK, CDK Pipelines, TypeScript
(to be added)
(to be added)
(to be added)
Field | Type | Description |
---|---|---|
id |
string |
Required. ID for this pipeline |
pipeline |
pipeline |
Required. pipeline definition |
Field | Type | Description |
---|---|---|
repo |
repo |
Required. source stage definition |
build |
build |
build stage definition |
validate |
validate |
validate stage definition |
Field | Type | Description |
---|---|---|
type |
CodeCommit |
Required. literal if CodeCommit |
name |
string |
Required. name of the repo |
create |
boolean |
whether to create or pre-existing |
Field | Type | Description |
---|---|---|
type |
GitHub |
Required. literal if GitHub |
name |
string |
Required. GitHub repo name |
tokenName |
string |
Required. Secrets Manager token name |
owner |
string |
Required. GitHub account name |
Field | Type | Description |
---|---|---|
compute |
Small / Medium / Large / 2xLarge |
build container compute size |
Field | Type | Description |
---|---|---|
compute |
Small / Medium / Large / 2xLarge |
validate container compute size |
emails |
array of strings |
email addresses to send notification |