$ npm install -g aws-cdk
$ python -m venv .venv
$ source .venv/bin/activate
Once the virtualenv is activated, you can install the required dependencies.
$ pip install -r requirements.txt
At this point you can now synthesize the CloudFormation template for this code.
$ cdk synth
You can now begin exploring the source code, contained in the hello directory. There is also a very trivial test included that can be run like this:
$ pytest
To add additional dependencies, for example other CDK libraries, just add to
your requirements.txt file and rerun the pip install -r requirements.txt
command.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk destroy
destroy your deploymentcdk diff
compare deployed stack with current statecdk docs
open CDK documentation
$ eval "$(ssh-agent -s)"
$ ssh-add -K name-of-your-key.pem
$ ssh -A user@bastion_host_FQDN_or_public_IP
Enjoy!