This article will guide you to install and configure AWS CDK for all your future projects that are going to build on AWS. This guide will work for all three platforms — Linux, Mac, and Windows
The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework to define your cloud application resources using familiar programming languages.
CDK can save you from all troublesome activities like manually creating buckets on AWS, write custom scripts, maintain templates, or learn domain-specific languages. It utilizes highly expressive and easy to code syntax in your favorite programming language — In our case, it will be Python.
Prerequisites for following this article —
NPM and Node v12+ installed
Python v3.6+ version installed
Step 1. Install AWS CDK
AWS CDK is fairly easy to install using NPM. Run the below command to install AWS CDK.
$ npm install -g aws-cdk
This will install the latest stable version of CDK globally in your system. CDK will be used to create our very first CDK app.
Step 2. Create Your First CDK App
Run the below commands to create a CDK app with the runtime as Python. Following commands works well in Mac and Linux OS.
$ mkdir project-cdk && cd project-cdk $ cdk init app --language=python
In case you are using _Windows, _you can create **project-cdk **directory using right-click option and then run the _cdk init _command inside project-cdk.
After successful initialization, you will see some files inside the directory as shown below:
. ├── README.md ├── app.py ├── cdk.json ├── project-cdk │ ├── __init__.py │ └── project-cdk_stack.py ├── requirements.txt ├── setup.py └── source.bat
And that’s it!
More About The Author😄
I am a full-time software engineer with 4+ years of experience in Python, AWS, and many more technologies. I have started writing recently as it helps me to read more. I am looking forward to sharing technical knowledge and my life experiences with people out there.
Register Here for my Programmer Weekly newsletter where I share interesting tutorials, python libraries, and tools, etc.
Github | LinkedIn | Twitter | Facebook | Quora | Programmer Weekly