The environments for development can be many: you can organize a CI/CD system with your favorite software. The primary features of your CI/CD are: having a complete environment for
- development for each developer, to implement something and for running unit tests
- staging for running unit and integration tests, to check everything before release
- production
With AWS CDK system, you can create an AWS CodePipeline for each environment!
For running the unit tests, you need only your client: you can use a virtual environment
cd aws-static-website/
pip3 install --upgrade -r requirements.txt
python3 -m unittest discover -v
AWS CDK system allows you to create the AWS resources for each environment by adding a contextual string parameter (in the sample is stage) !
cd aws-static-website/
export AWS_PROFILE=your-account
export STAGE=my-development
cdk deploy '*' -c stage=${STAGE}
You can destroy the resources with a simple command
cd aws-static-website/
export AWS_PROFILE=your-account
export STAGE=my-development
cdk destroy '*' -c stage=${STAGE}
If you want to see other sample of AWS CDK commands, you can see the repository named aws-static-gui-resources or its documentation.