Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)40k · #7071

aws-cdk-python-setup

Was er macht

Diese Anleitung hilft dir, deinen Computer für Cloud-Projekte mit AWS CDK und Python einzurichten. Sie zeigt dir, wie du die nötigen Tools installierst, ein neues Projekt anlegst und alles vorbereitest, um mit der Entwicklung zu starten.

Wann du ihn nutzt

  • ✓Wenn du Cloud-Infrastruktur mit Code aufbauen willst.
  • ✓Wenn du Python schon nutzt und AWS-Ressourcen verwalten willst.
  • ✓Wenn du Tutorials folgst, die eine AWS-CDK-Umgebung voraussetzen.

Link zum Skill

https://github.com/github/awesome-copilot/blob/main/skills/aws-cdk-python-setup/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/github/awesome-copilot/blob/main/skills/aws-cdk-python-setup/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie richte ich meinen Computer ein, um ein AWS-CDK-Projekt in Python zu erstellen?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Es prüft, ob du die richtigen Tools (Node.js, Python, AWS CLI) installiert hast, zeigt dir, wie du AWS CDK installierst und deine AWS-Zugangsdaten einrichtest, und legt ein neues Projekt mit einer virtuellen Python-Umgebung an.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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.
Häufige Fragen

Was ist AWS CDK?

AWS CDK ist ein Tool, mit dem du deine Cloud-Infrastruktur (z. B. Server und Datenbanken) in Programmiersprachen beschreibst, die du kennst, zum Beispiel Python.

Muss ich mich mit AWS sehr gut auskennen?

Nein, CDK vereinfacht vieles. Diese Anleitung konzentriert sich darauf, deine Umgebung für den Einstieg mit CDK vorzubereiten.

Was ist eine virtuelle Python-Umgebung?

Das ist wie eine abgeschottete Box für dein Python-Projekt. Die darin verwendeten Bibliotheken stören dann keine anderen Installationen auf deinem Computer.

Details

Originalbeschreibung des Autors

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.

repo: github/awesome-copilot

Beliebtheit

GitHub-Sterne
40k
Platz im Ranking
#7071
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills