Creating a project in Python


The AWS CDK supports the Python programming language to define cloud infrastructure on AWS.

These steps assume all the pre requisities are already setup.

Python version

You will need Python version 3.6 or later installed.

Virtual environment

AWS CDK encourages you to make use of Python virtual environments, so ensure this and pip are installed.

python -m ensurepip --upgrade
python -m pip install --upgrade pip
python -m pip install --upgrade virtualenv

Initialize a project

mkdir new-cdk-py-project && cd new-cdk-py-project
cdk init app --language python

Source the virtual environment

source .env/bin/activate

Install of app dependencies

pip install -r requirements.txt

Further reading

Project Structure

Working with AWS CDK in Python

Last updated on 23 Jun 2020
Published on 23 Jun 2020