This app logs path /hello
, /hi
to dynamodb and displays it as HTML website.
To try the demo visit CDKWorkshop
- Setup Admin user
cdk-workshop
with AdminAccess - Configure aws credentials
- Check Node.js version is >= 10.13.0, if not update it
- Install CDK toolkit
npm install -g aws-cdk
& Check CDK versioncdk --version
is >= 2.0.0 - Check Python is >= 3.6
-
Git clone the repository
-
Activate the virtualenv
To manually create a virtualenv on MacOS and Linux:
$ python3 -m venv .venv
After the init process completes and the virtualenv is created, you can use the following step to activate your virtualenv.
$ source .venv/bin/activate
If you are a Windows platform, you would activate the virtualenv like this:
% .venv\Scripts\activate.bat
Once the virtualenv is activated, you can install the required dependencies.
$ pip install -r requirements.txt
- Sythesize the CloudFormation template At this point you can now synthesize the CloudFormation template for this code.
$ cdk synth
To add additional dependencies, for example other CDK libraries, just add
them to your setup.py
file and rerun the pip install -r requirements.txt
command.
- Deploy the stack
$ cdk deploy
cdk ls
list all stacks in the appcdk synth
emits 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
Enjoy!