Skip to content
Skillpedia
Deploy & cloud (DevOps)40k · #5014

aws-cdk-python-setup

Makes your agent set up the environment for developing with AWS CDK in Python. It helps create projects, manage dependencies, and deploy to AWS.

What it does

This guide helps you set up your computer to build cloud projects using AWS CDK with Python. It shows you how to install necessary tools, create a new project, and prepare everything to start developing.

When to use it

  • ✓When you want to start building cloud infrastructure with code.
  • ✓If you already use Python and want to manage AWS resources.
  • ✓When following tutorials that ask to set up an AWS CDK environment.

Example of what to ask your AI

“How do I set up my computer to create an AWS CDK project in Python?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/github/awesome-copilot/blob/main/skills/aws-cdk-python-setup/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/aws-cdk-python-setup/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It checks if you have the right tools (Node.js, Python, AWS CLI) installed, shows how to install the AWS CDK, configure your AWS credentials, and create a new project with a Python virtual environment.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add github/awesome-copilot --skill aws-cdk-python-setup

Or download just the file:

curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/aws-cdk-python-setup/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

AWS CDK Python Setup Instructions

This skill provides setup guidance for working with AWS CDK (Cloud Development Kit) projects using Python.


Prerequisites

Before starting, ensure the following tools are installed:

  • Node.js ≥ 14.15.0 — Required for the AWS CDK CLI
  • Python ≥ 3.7 — Used for writing CDK code
  • AWS CLI — Manages credentials and resources
  • Git — Version control and project management

Installation Steps

1. Install AWS CDK CLI

npm install -g aws-cdk
cdk --version

2. Configure AWS Credentials

# Install AWS CLI (if not installed)
brew install awscli

# Configure credentials
aws configure

Enter your AWS Access Key, Secret Access Key, default region, and output format when prompted.

3. Create a New CDK Project

mkdir my-cdk-project
cd my-cdk-project
cdk init app --language python

Your project will include:

  • app.py — Main application entry point
  • my_cdk_project/ — CDK stack definitions
  • requirements.txt — Python dependencies
  • cdk.json — Configuration file

4. Set Up Python Virtual Environment

# macOS/Linux
source .venv/bin/activate

# Windows
.venv\Scripts\activate

5. Install Python Dependencies

pip install -r requirements.txt

Primary dependencies:

  • aws-cdk-lib — Core CDK constructs
  • constructs — Base construct library

Development Workflow

Synthesize CloudFormation Templates

cdk synth

Generates cdk.out/ containing CloudFormation templates.

Deploy Stacks to AWS

cdk deploy

Reviews and confirms deployment to the configured AWS account.

Bootstrap (First Deployment Only)

cdk bootstrap

Prepares environment resources like S3 buckets for asset storage.


Best Practices

  • Always activate the virtual environment before working.
  • Run cdk diff before deployment to preview changes.
  • Use development accounts for testing.
  • Follow Pythonic naming and directory conventions.
  • Keep requirements.txt pinned for consistent builds.

Troubleshooting Tips

If issues occur, check:

  • AWS credentials are correctly configured.
  • Default region is set properly.
  • Node.js and Python versions meet minimum requirements.
  • Run cdk doctor to diagnose environment issues.
FAQ

What is AWS CDK?

AWS CDK is a tool that lets you define your cloud infrastructure (like servers and databases) using programming languages you know, such as Python.

Do I need to know everything about AWS to use this?

No, the CDK simplifies the process. This guide focuses on preparing your environment to start using the CDK.

What is a Python virtual environment?

It's like an isolated box for your Python project, ensuring that the libraries used in it don't interfere with other installations on your computer.

Details

Original description by the author

Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment prerequisites, create new CDK projects, manage dependencies, and deploy to AWS.

repo: github/awesome-copilot

Popularity

GitHub stars
40k
Ranking position
#5014
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills