aws-cdk-python-setup
github/awesome-copilot
Setup and deploy AWS CDK applications in Python with guided environment configuration and project initialization.
What is aws-cdk-python-setup?
This skill provides step-by-step guidance for configuring AWS CDK development environments in Python, including prerequisite installation, project creation, dependency management, and deployment. Use it when starting a new CDK project or setting up a development machine for infrastructure-as-code work.
- Install and configure AWS CDK CLI globally via npm
- Set up AWS credentials and authentication through AWS CLI
- Initialize new CDK Python projects with standard structure and dependencies
- Activate Python virtual environments and install required packages
- Synthesize CloudFormation templates from CDK code
- Deploy infrastructure stacks to AWS accounts with change preview
How to install aws-cdk-python-setup
npx skills add https://github.com/github/awesome-copilot --skill aws-cdk-python-setup- Node.js version 14.15.0 or higher
- Python version 3.7 or higher
- AWS CLI installed and available in PATH
- Git for version control
- Valid AWS account with access credentials
How to use aws-cdk-python-setup
- 1.Install AWS CDK CLI globally using npm install -g aws-cdk and verify with cdk --version
- 2.Configure AWS credentials by running aws configure and entering your Access Key, Secret Key, region, and output format
- 3.Create a new CDK project directory and initialize it with cdk init app --language python
- 4.Activate the Python virtual environment using source .venv/bin/activate (macOS/Linux) or .venv\Scripts\activate (Windows)
- 5.Install Python dependencies with pip install -r requirements.txt
- 6.Run cdk bootstrap to prepare AWS environment resources on first deployment
- 7.Use cdk synth to generate CloudFormation templates and cdk deploy to deploy to AWS
Use cases
- Setting up a new AWS CDK Python project from scratch on a development machine
- Configuring AWS credentials and environment for the first time before CDK work
- Initializing project structure with app.py and stack definitions for infrastructure code
- Deploying infrastructure changes to AWS with cdk deploy after development
- Diagnosing environment configuration issues using cdk doctor and troubleshooting steps
- DevOps engineers setting up infrastructure-as-code pipelines
- Python developers building AWS cloud infrastructure programmatically
- Cloud architects implementing infrastructure automation
- Teams establishing CDK development environments across multiple machines
aws-cdk-python-setup FAQ
Python 3.7 or higher is required for AWS CDK development.
No, cdk bootstrap only needs to run once per AWS account and region to prepare environment resources like S3 buckets.
Run cdk diff to see the CloudFormation changes that will be applied before executing cdk deploy.
Verify AWS credentials are correctly configured by running aws configure, check that your default region is set, and use cdk doctor to diagnose environment issues.
Yes, you can use the setup steps to configure your environment and then work with existing projects by activating the virtual environment and installing dependencies.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: aws-cdk-python-setup description: 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.
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 pointmy_cdk_project/— CDK stack definitionsrequirements.txt— Python dependenciescdk.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 constructsconstructs— 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 diffbefore deployment to preview changes. - Use development accounts for testing.
- Follow Pythonic naming and directory conventions.
- Keep
requirements.txtpinned 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 doctorto diagnose environment issues.
Related skills
More from github/awesome-copilot and the wider catalog.

az-cost-optimize
Analyze Azure resources and IaC to identify cost optimizations, creating GitHub issues for tracking implementation.

azure-architecture-autopilot
>

azure-deployment-preflight
Validate Bicep deployments to Azure before execution with syntax checks, what-if analysis, and permission verification.

azure-devops-cli
Manage Azure DevOps projects, repos, pipelines, builds, and work items via CLI.

azure-pricing
Fetch real-time Azure pricing and estimate Copilot Studio agent credit costs.

azure-resource-health-diagnose
Diagnose Azure resource health issues and generate remediation plans from logs and telemetry.