Index of every page on this site: llms.txt
All skills
github avatar

/aws-cdk-python-setup

@f10fdb8 official
by githubgithub/awesome-copilot41k stars
5,399
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/aws-cdk-python-setup

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈63 tokens for metadata: the name and description. ≈585 when used: this file.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈254 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo4 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides standard, safe instructions for setting up an AWS CDK environment using official tools and well-known package managers.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 8 months ago
  • Python
  • aws-cdk
  • infrastructure-as-code
  • cloudformation
  • aws
  • setup
  • deployment

README badge

README badge for github/awesome-copilot/aws-cdk-python-setup

Provides step-by-step setup and initialization for AWS CDK Python projects, covering Node.js and Python prerequisites, AWS credential configuration, virtual environment setup, and basic deployment workflows. Targets developers starting new CDK projects in Python and includes commands for synthesizing CloudFormation templates and bootstrapping AWS environments.

Generated from the current SKILL.md.

What are the minimum Node.js and Python versions required?
Node.js ≥ 14.15.0 and Python ≥ 3.7. Node.js is required for the AWS CDK CLI even though you write infrastructure code in Python.
Do I need to bootstrap my AWS environment before deploying?
Yes, run `cdk bootstrap` once per AWS account/region before your first deployment. It creates S3 buckets and other resources needed to store CDK assets.
What's the difference between `cdk synth` and `cdk deploy`?
`cdk synth` generates CloudFormation templates locally without touching AWS. `cdk deploy` reviews the changes and deploys the stacks to your configured AWS account.
How do I preview what will change before deploying?
Run `cdk diff` to see a diff of the changes that will be applied to your AWS resources.
What should I do if deployment fails?
Verify AWS credentials are configured, the default region is set, Node.js and Python versions meet requirements, and run `cdk doctor` to diagnose environment issues.

Generated from the current SKILL.md. These answers refresh after source changes.