A simple Flask web application that can be deployed to ECS Fargate using the AWS CDK.
npm install -g aws-cdk
cdk bootstrap aws://ACCOUNT-NUMBER/REGION
After the bootstrapping process completes, run the following commands to activate the virtualenv and install the AWS CDK core dependencies.
source .venv/bin/activate
python -m pip install -r requirements.txt
The initialization process also creates a virtualenv within this project, stored under the .venv
directory. To manually create a virtualenv:
python -m venv .venv
To deploy the stack, run the following command(s):
cdk synth # synthesizes and outputs the AWS CloudFormation template (optional)
cdk deploy # synthesizes and deploys the stack
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