AWS CDK Python Setup (#1071)

Co-authored-by: Aaron Powell <me@aaron-powell.com>
This commit is contained in:
Sanjay Ramassery Babu
2026-03-19 00:02:10 +00:00
committed by GitHub
parent be6b400fb5
commit a31b09b60f
2 changed files with 112 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to
| [aspnet-minimal-api-openapi](../skills/aspnet-minimal-api-openapi/SKILL.md) | Create ASP.NET Minimal API endpoints with proper OpenAPI documentation | None | | [aspnet-minimal-api-openapi](../skills/aspnet-minimal-api-openapi/SKILL.md) | Create ASP.NET Minimal API endpoints with proper OpenAPI documentation | None |
| [automate-this](../skills/automate-this/SKILL.md) | Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files, reconstructs the step-by-step workflow, and proposes automation at multiple complexity levels using tools already installed on the user machine. | None | | [automate-this](../skills/automate-this/SKILL.md) | Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files, reconstructs the step-by-step workflow, and proposes automation at multiple complexity levels using tools already installed on the user machine. | None |
| [autoresearch](../skills/autoresearch/SKILL.md) | Autonomous iterative experimentation loop for any programming task. Guides the user through defining goals, measurable metrics, and scope constraints, then runs an autonomous loop of code changes, testing, measuring, and keeping/discarding results. Inspired by Karpathy's autoresearch. USE FOR: autonomous improvement, iterative optimization, experiment loop, auto research, performance tuning, automated experimentation, hill climbing, try things automatically, optimize code, run experiments, autonomous coding loop. DO NOT USE FOR: one-shot tasks, simple bug fixes, code review, or tasks without a measurable metric. | None | | [autoresearch](../skills/autoresearch/SKILL.md) | Autonomous iterative experimentation loop for any programming task. Guides the user through defining goals, measurable metrics, and scope constraints, then runs an autonomous loop of code changes, testing, measuring, and keeping/discarding results. Inspired by Karpathy's autoresearch. USE FOR: autonomous improvement, iterative optimization, experiment loop, auto research, performance tuning, automated experimentation, hill climbing, try things automatically, optimize code, run experiments, autonomous coding loop. DO NOT USE FOR: one-shot tasks, simple bug fixes, code review, or tasks without a measurable metric. | None |
| [aws-cdk-python-setup](../skills/aws-cdk-python-setup/SKILL.md) | 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. | None |
| [az-cost-optimize](../skills/az-cost-optimize/SKILL.md) | Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations. | None | | [az-cost-optimize](../skills/az-cost-optimize/SKILL.md) | Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations. | None |
| [azure-deployment-preflight](../skills/azure-deployment-preflight/SKILL.md) | Performs comprehensive preflight validation of Bicep deployments to Azure, including template syntax validation, what-if analysis, and permission checks. Use this skill before any deployment to Azure to preview changes, identify potential issues, and ensure the deployment will succeed. Activate when users mention deploying to Azure, validating Bicep files, checking deployment permissions, previewing infrastructure changes, running what-if, or preparing for azd provision. | `references/ERROR-HANDLING.md`<br />`references/REPORT-TEMPLATE.md`<br />`references/VALIDATION-COMMANDS.md` | | [azure-deployment-preflight](../skills/azure-deployment-preflight/SKILL.md) | Performs comprehensive preflight validation of Bicep deployments to Azure, including template syntax validation, what-if analysis, and permission checks. Use this skill before any deployment to Azure to preview changes, identify potential issues, and ensure the deployment will succeed. Activate when users mention deploying to Azure, validating Bicep files, checking deployment permissions, previewing infrastructure changes, running what-if, or preparing for azd provision. | `references/ERROR-HANDLING.md`<br />`references/REPORT-TEMPLATE.md`<br />`references/VALIDATION-COMMANDS.md` |
| [azure-devops-cli](../skills/azure-devops-cli/SKILL.md) | Manage Azure DevOps resources via CLI including projects, repos, pipelines, builds, pull requests, work items, artifacts, and service endpoints. Use when working with Azure DevOps, az commands, devops automation, CI/CD, or when user mentions Azure DevOps CLI. | `references/advanced-usage.md`<br />`references/boards-and-iterations.md`<br />`references/org-and-security.md`<br />`references/pipelines-and-builds.md`<br />`references/repos-and-prs.md`<br />`references/variables-and-agents.md`<br />`references/workflows-and-patterns.md` | | [azure-devops-cli](../skills/azure-devops-cli/SKILL.md) | Manage Azure DevOps resources via CLI including projects, repos, pipelines, builds, pull requests, work items, artifacts, and service endpoints. Use when working with Azure DevOps, az commands, devops automation, CI/CD, or when user mentions Azure DevOps CLI. | `references/advanced-usage.md`<br />`references/boards-and-iterations.md`<br />`references/org-and-security.md`<br />`references/pipelines-and-builds.md`<br />`references/repos-and-prs.md`<br />`references/variables-and-agents.md`<br />`references/workflows-and-patterns.md` |

View File

@@ -0,0 +1,111 @@
---
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
```bash
npm install -g aws-cdk
cdk --version
```
### 2. Configure AWS Credentials
```bash
# 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
```bash
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
```bash
# macOS/Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
```
### 5. Install Python Dependencies
```bash
pip install -r requirements.txt
```
Primary dependencies:
- `aws-cdk-lib` — Core CDK constructs
- `constructs` — Base construct library
---
## Development Workflow
### Synthesize CloudFormation Templates
```bash
cdk synth
```
Generates `cdk.out/` containing CloudFormation templates.
### Deploy Stacks to AWS
```bash
cdk deploy
```
Reviews and confirms deployment to the configured AWS account.
### Bootstrap (First Deployment Only)
```bash
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.