Generated banner for AWS Cdk Python Setup
Generated logo for AWS Cdk Python Setup

AWS Cdk Python Setup

GitHubOfficialFirst committed by sanjay-rbDistributed by GitHub

  • Skill
  • Workflow
  • Cloud and DevOps
  • MIT
  • Low risk

From 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.
— the description by sanjay-rb

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured workflow for initializing and managing AWS Cloud Development Kit (CDK) projects with Python. It covers the essential prerequisites, environment configuration, project scaffolding, dependency management, and the standard deployment lifecycle for AWS infrastructure.

What it does

  • Guides users through installing the AWS CDK CLI and necessary prerequisites.
  • Provides steps to initialize a new Python-based CDK project.
  • Details the process for setting up virtual environments and managing Python dependencies.
  • Outlines the workflow for synthesizing, bootstrapping, and deploying infrastructure stacks.
  • Offers best practices for maintaining consistent and safe infrastructure deployments.

When to use it

  • When starting a new infrastructure-as-code project using AWS CDK and Python.
  • When setting up a local development environment for AWS cloud resource management.
  • When needing a reference for standard CDK deployment and synthesis commands.
  • When troubleshooting common environment or configuration issues in a CDK project.

Advantages

  • Provides a clear, step-by-step path for environment setup.
  • Promotes standard practices like using virtual environments and dependency pinning.
  • Simplifies the transition from project initialization to cloud deployment.
  • Includes helpful diagnostic commands for environment troubleshooting.

Usage examples

“How do I start a new AWS CDK project using Python?”
The agent provides the commands to create a directory, run the CDK initialization command for Python, and set up the virtual environment.
“What is the standard workflow to deploy my CDK stack to AWS?”
The agent explains the sequence of synthesizing the template, bootstrapping the environment, and executing the deployment command.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/github/aws-cdk-python-setup/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip aws-cdk-python-setup.zip -d .agents/skills

Documentation by sanjay-rb

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.

Files

SKILL.md

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.

Requirements and compatibility

Written for: GitHub Copilot

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs a command-line tool, Needs Python, Needs Node.js

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

First committed by
GitHub avatar of sanjay-rbsanjay-rb
Publisher
GitHub (Official)
Distributed by
GitHub
Source
github/awesome-copilot · skills/aws-cdk-python-setup · commit 797337f
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
sanjay-rb

AutoGineer is not affiliated with or endorsed by sanjay-rb or GitHub.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download aws-cdk-python-setup.zip