aws-cdk-development
Fungsinya
Membantu Anda membangun dan mengelola infrastruktur cloud Amazon Web Services (AWS) menggunakan AWS CDK. Alat ini memberikan panduan praktik terbaik, seperti cara memberi nama resource dan mengatur fungsi Lambda, sehingga infrastruktur Anda aman dan efisien.
Kapan dipakai
- ✓Saat memulai proyek infrastruktur AWS baru dengan CDK.
- ✓Saat Anda perlu merombak atau memperbaiki infrastruktur yang sudah ada.
- ✓Untuk memastikan pengaturan infrastruktur Anda mengikuti praktik terbaik keamanan dan efisiensi.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/aws-cdk-development/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bagaimana cara membuat fungsi Lambda dengan Python menggunakan AWS CDK, sambil memastikan dependensi dikelola secara otomatis?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Alat ini menggunakan AWS CDK, yang memungkinkan Anda mendefinisikan infrastruktur sebagai kode (dalam TypeScript atau Python). Alat ini memeriksa konfigurasi Anda dengan alat validasi dan memberikan contoh untuk menerapkan resource umum seperti fungsi Lambda, sesuai rekomendasi AWS.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Bundled upstream support
Supporting files are included at skill-relative paths. See UPSTREAM-NOTICE.md for their pinned sources, licenses, hashes, and import changes.
Restored helper safety
scripts/validate-stack.sh runs cdk synth from the caller-selected project root, which executes that project's CDK application and dependencies, can write cdk.out, and may contact AWS context providers if the project requires lookups. Review the project and AWS context before invoking it. The helper does not deploy; deployment needs separate user authorization.
AWS CDK Development
This skill provides comprehensive guidance for developing AWS infrastructure using the Cloud Development Kit (CDK), with integrated MCP servers for accessing latest AWS knowledge and CDK utilities.
AWS Documentation Requirement
Always verify AWS facts using MCP tools (mcp__aws-mcp__* or mcp__*awsdocs*__*) before answering. The aws-mcp-setup dependency is auto-loaded — if MCP tools are unavailable, guide the user through that skill's setup flow.
CDK-Specific MCP Guidance
AWS Labs replaced the dedicated CDK MCP server (awslabs.cdk-mcp-server) with the broader awslabs.aws-iac-mcp-server, which covers CDK alongside CloudFormation and other AWS infrastructure-as-code workflows.
For CDK construct lookups, best-practice recommendations, and pattern guidance, install awslabs.aws-iac-mcp-server. It ships in the deploy-on-aws plugin from awslabs/agent-plugins, or can be registered directly with claude mcp add aws-iac uvx awslabs.aws-iac-mcp-server@latest.
When to reach for it:
- CDK construct recommendations and API lookups
- CDK and CloudFormation best-practice patterns
- Validation of synthesized templates
- Cross-resource configuration guidance
When to Use This Skill
Use this skill when:
- Creating new CDK stacks or constructs
- Refactoring existing CDK infrastructure
- Implementing Lambda functions within CDK
- Following AWS CDK best practices
- Validating CDK stack configurations before deployment
- Verifying AWS service capabilities and regional availability
Core CDK Principles
Resource Naming
CRITICAL: Do NOT explicitly specify resource names when they are optional in CDK constructs.
Why: CDK-generated names enable:
- Reusable patterns: Deploy the same construct/pattern multiple times without conflicts
- Parallel deployments: Multiple stacks can deploy simultaneously in the same region
- Cleaner shared logic: Patterns and shared code can be initialized multiple times without name collision
- Stack isolation: Each stack gets uniquely identified resources automatically
Pattern: Let CDK generate unique names automatically using CloudFormation's naming mechanism.
// ❌ BAD - Explicit naming prevents reusability and parallel deployments
new lambda.Function(this, 'MyFunction', {
functionName: 'my-lambda', // Avoid this
// ...
});
// ✅ GOOD - Let CDK generate unique names
new lambda.Function(this, 'MyFunction', {
// No functionName specified - CDK generates: StackName-MyFunctionXXXXXX
// ...
});
Security Note: For different environments (dev, staging, prod), follow AWS Security Pillar best practices by using separate AWS accounts rather than relying on resource naming within a single account. Account-level isolation provides stronger security boundaries.
Lambda Function Development
Use the appropriate Lambda construct based on runtime:
TypeScript/JavaScript: Use @aws-cdk/aws-lambda-nodejs
import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
new NodejsFunction(this, 'MyFunction', {
entry: 'lambda/handler.ts',
handler: 'handler',
// Automatically handles bundling, dependencies, and transpilation
});
Python: Use @aws-cdk/aws-lambda-python
import { PythonFunction } from '@aws-cdk/aws-lambda-python-alpha';
new PythonFunction(this, 'MyFunction', {
entry: 'lambda',
index: 'handler.py',
handler: 'handler',
// Automatically handles dependencies and packaging
});
Benefits:
- Automatic bundling and dependency management
- Transpilation handled automatically
- No manual packaging required
- Consistent deployment patterns
Pre-Deployment Validation
Use a multi-layer validation strategy for comprehensive CDK quality checks:
Layer 1: Real-Time IDE Feedback (Recommended)
For TypeScript/JavaScript projects:
…
Pertanyaan umum
Mengapa saya sebaiknya tidak menentukan nama resource secara eksplisit di CDK?
Dengan tidak menentukan nama secara eksplisit, CDK dapat membuat nama unik secara otomatis. Hal ini membuat kode lebih mudah digunakan ulang, memudahkan deployment paralel, dan mencegah konflik nama antarbagian infrastruktur Anda.
Bagaimana CDK menangani pembuatan fungsi Lambda?
Untuk TypeScript/JavaScript, gunakan `@aws-cdk/aws-lambda-nodejs`. Untuk Python, gunakan `@aws-cdk/aws-lambda-python-alpha`. Library ini secara otomatis menangani bundling, dependensi, dan transpilasi, sehingga prosesnya lebih sederhana.
Apa itu validasi sebelum deployment dan mengapa penting?
Validasi sebelum deployment adalah proses pemeriksaan berlapis untuk memastikan kualitas infrastruktur Anda sebelum di-deploy ke AWS. Prosesnya mencakup umpan balik real-time di IDE, validasi saat sintesis (pembuatan template), dan jaring pengaman sebelum commit (build dan tes).
Detail
Deskripsi asli dari pembuat
AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #3852
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- …
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.