IoS CI/CD Pipeline on AWS
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.
Sample Usage
(to be added)
Prerequisites
- 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
Initial Deployment
- 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.
Screenshots
Tech Stack
CDK, CDK Pipelines, TypeScript
FAQ
How does an IaC pipeline simplify building on the cloud?
(to be added)
Why use CDK instead of CloudFormation scripts?
(to be added)
What value does CDK Pipelines add to CDK?
(to be added)
Schema
archi
Field | Type | Description |
---|---|---|
id |
string |
Required. ID for this pipeline |
pipeline |
pipeline |
Required. pipeline definition |
pipeline
Field | Type | Description |
---|---|---|
repo |
repo |
Required. source stage definition |
build |
build |
build stage definition |
validate |
validate |
validate stage definition |
repo (CodeCommit)
Field | Type | Description |
---|---|---|
type |
CodeCommit |
Required. literal if CodeCommit |
name |
string |
Required. name of the repo |
create |
boolean |
whether to create or pre-existing |
repo (GitHub)
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 |
build
Field | Type | Description |
---|---|---|
compute |
Small / Medium / Large / 2xLarge |
build container compute size |
validate
Field | Type | Description |
---|---|---|
compute |
Small / Medium / Large / 2xLarge |
validate container compute size |
emails |
array of strings |
email addresses to send notification |