The code in this directory deploys an AWS Cloud Development Kit (AWS CDK) stack for hosting container images in Amazon Elastic Container Registry (Amazon ECR).
This stack can be deployed in isolation; however, it serves a purpose in this repository's test automation architecture.
Specifically, a GitHub action workflow builds and publishes Docker images into the Amazon ECR repositories managed by this stack.
- npm (node.js)
- python 3.x
- AWS access key and secret for AWS user with permissions to create the preceding resources
First, install the AWS CDK:
sudo npm install -g aws-cdk
You can check the toolkit version with this command:
cdk --version
Now you are ready to create a virtualenv:
python3 -m venv .venv
Activate your virtualenv:
source .venv/bin/activate
Install the required dependencies:
pip install -r requirements.txt
At this point you can now synthesize the AWS CloudFormation template for this code.
cdk synth
If everything looks good, go ahead and deploy. This step will actually make changes to your AWS cloud environment.
cdk bootstrap
cdk deploy
To clean up, issue this command:
cdk destroy
To exit the virtualenv python environment:
deactivate
cdk ls
List all stacks in the appcdk synth
Emit the synthesized CloudFormation templatecdk deploy
Deploy this stack to your default AWS account/Regioncdk diff
Compare deployed stack with current statecdk docs
Open CDK documentation
This code has been tested and verified to run with AWS CDK 2.70.0 (build c13a0f1).