New to Claude Skills? Learn how to install them →

github on GitHub

AWS CDK Python Setup

OfficialFree

Streamline your AWS CDK development in Python.

by github37.7k stars on github/awesome-copilot
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What AWS CDK Python Setup does

The AWS CDK Python Setup skill provides a comprehensive guide for developers looking to build applications using the AWS Cloud Development Kit (CDK) with Python. This skill ensures that users have the necessary prerequisites installed, including Node.js, Python, AWS CLI, and Git, setting the stage for a smooth development experience. By following the provided instructions, users can quickly get their environment ready to create and manage AWS resources using code.

Once the prerequisites are in place, the skill walks users through the installation of the AWS CDK CLI, configuration of AWS credentials, and the creation of a new CDK project. The project structure is clearly defined, with essential files such as app.py, requirements.txt, and cdk.json outlined. This organization helps developers understand where to place their code and how to manage dependencies effectively.

The skill also covers the development workflow, including synthesizing CloudFormation templates and deploying stacks to AWS. With commands like cdk synth and cdk deploy, users can generate the necessary infrastructure as code and push their applications to the cloud. Additionally, best practices and troubleshooting tips are included to help users avoid common pitfalls and ensure a successful setup.

Overall, this skill is ideal for Python developers who want to leverage the AWS CDK for cloud infrastructure management. It simplifies the setup process and provides clear guidance, making it easier to focus on building robust applications without getting bogged down in configuration issues.

When to use it

Use this skill when you want to start developing AWS CDK applications in Python and need a structured setup guide.

When not to use it

This skill may not be suitable if you are already familiar with AWS CDK setup or if you prefer a different programming language for your CDK projects.

What you can build with it

Starting a New AWS CDK Project

Use this skill to quickly initialize a new AWS CDK project in Python, ensuring all dependencies and configurations are correctly set.

Setting Up AWS Credentials

Follow the skill's instructions to configure your AWS credentials, enabling seamless interaction with AWS services.

Troubleshooting Environment Issues

Utilize the troubleshooting tips provided in this skill to resolve common setup problems and ensure your development environment is functioning properly.

How to install AWS CDK Python Setup

View source

1. Install with the skills CLI

npx skills add github/awesome-copilot/aws-cdk-python-setup --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by 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.

Frequently asked questions about AWS CDK Python Setup

Similar skills