Build well-architected AWS infrastructure with Python CDK directly from Kiro using natural language. This Power wraps the official awslabs.aws-iac-mcp-server and adds Python CDK-specific steering, security validation workflows, and guided hooks.
- 9 tools — CDK docs search, Python code samples, best practices, cfn-lint validation, cfn-guard compliance, deployment troubleshooting, CloudFormation docs, and full page reader
- Python CDK steering — conventions, project structure, construct patterns, anti-patterns
- Validation workflow — synth → cfn-lint → cfn-guard → deploy pipeline
- Security checklist — IAM, encryption, network, data protection, CDK-NAG integration
- Hooks — auto-validate after synth, best-practice check on save, pre-deploy gate
- Project template — production-ready scaffold with cdk-nag, pytest, multi-env config
- Zero AWS credentials needed for 8 of 9 tools (only troubleshooting needs credentials)
| Requirement | Purpose | Install |
|---|---|---|
| uv | Runs the MCP server via uvx |
https://docs.astral.sh/uv/getting-started/installation/ |
| Python 3.10+ | CDK application code | uv python install 3.10 |
| AWS CDK CLI | Synthesize and deploy stacks | npm install -g aws-cdk |
| AWS Credentials | Only for troubleshooting failed stacks | aws configure |
-
Clone this repo:
git clone https://github.com/intraedge-services/kiro-powers-aws-iaac.git
-
Open Kiro IDE → Powers panel → "Add power from Local Path" → select the cloned directory
-
The MCP server connects automatically via
uvx
In Kiro chat, type: "Get CDK best practices"
You should see the CDK best practices guide returned. No AWS credentials needed for this test.
Talk to Kiro in natural language:
Search for Python CDK patterns for API Gateway with Lambda
Show me how to create a secure S3 bucket in CDK Python
Validate this CloudFormation template for errors
Check this template for security compliance
Troubleshoot my failed stack MyAppStack in us-east-1
Scaffold a new CDK project for a serverless API
When searching for code samples, results are filtered for Python:
Find CDK code samples for DynamoDB with Lambda in Python
Kiro IDE → spawns uvx process → awslabs.aws-iac-mcp-server (stdio)
↓
CDK Knowledge Base + cfn-lint + cfn-guard + AWS APIs
The Power runs uvx awslabs.aws-iac-mcp-server@latest. Communication happens over stdin/stdout (MCP stdio transport). No Docker required, no custom server code.
| Tool | Purpose | Credentials |
|---|---|---|
search_cdk_documentation |
Search CDK API Reference, Best Practices, CDK-NAG rules | No |
search_cdk_samples_and_constructs |
Find Python CDK code samples and constructs | No |
cdk_best_practices |
Get comprehensive CDK best practices guide | No |
search_cloudformation_documentation |
Search CloudFormation resource types and properties | No |
validate_cloudformation_template |
Validate template syntax/schema via cfn-lint | No |
check_cloudformation_template_compliance |
Security compliance check via cfn-guard | No |
read_iac_documentation_page |
Read full AWS documentation pages | No |
get_cloudformation_pre_deploy_validation_instructions |
Pre-deployment change set guidance | No |
troubleshoot_cloudformation_deployment |
Analyze failed stack deployments with CloudTrail | Yes |
| Hook | Trigger | Action |
|---|---|---|
validate-on-synth |
Template file created | Offers to run cfn-lint + cfn-guard validation |
check-cdk-best-practices |
CDK Python file edited | Quick best-practices review |
pre-deploy-check |
Shell command (cdk deploy) | Reminds to validate before deploying |
kiro-powers-aws-iaac/
├── POWER.md # Power metadata and onboarding instructions
├── README.md # This file
├── mcp.json # MCP server config (awslabs.aws-iac-mcp-server via uvx)
├── steering/
│ ├── python-cdk-conventions.md # Project structure, coding patterns, anti-patterns
│ ├── cdk-validation-workflow.md # Synth → validate → comply → deploy pipeline
│ └── cdk-security-checklist.md # Security review checklist with CDK-NAG
├── hooks/
│ ├── validate-on-synth.json
│ ├── check-cdk-best-practices.json
│ └── pre-deploy-check.json
└── templates/
└── cdk-project/ # Production-ready CDK scaffold
├── app.py
├── cdk.json
├── requirements.txt
├── config/environments.py
├── stacks/example_stack.py
└── tests/test_example_stack.py
If you're using kiro-powers-aidlc, register this power in your project-config.md:
| infrastructure | aws-cdk-python | Infrastructure design, CDK/Python code generation |The orchestrator activates this power during Infrastructure Design and Code Generation stages.
| Error | Cause | Fix |
|---|---|---|
command not found: uvx |
uv not installed | Install from https://docs.astral.sh/uv/getting-started/installation/ |
| MCP server won't start | Python unavailable | uv python install 3.10 |
401 on troubleshoot |
AWS creds missing | aws configure or set AWS_PROFILE |
| Slow first start | uvx downloading package | Normal first time (~30s), cached after |
Kiro Power for AWS Infrastructure as Code - Python CDK with CloudFormation validation, security compliance, and best-practice patterns.
A dedicated Kiro Power wrapping the official awslabs.aws-iac-mcp-server with Python CDK focus.
What it provides:
| Layer | Contents |
|---|---|
| MCP Server | awslabs.aws-iac-mcp-server — 9 tools for CDK docs, samples, validation, compliance, troubleshooting |
| Steering | Python CDK conventions (auto-loads on *.py), validation workflow (on cdk.json), security checklist (manual) |
| Hooks | Auto-validate on synth, best-practice check on save, pre-deploy gate |
| Templates | Production-ready CDK project scaffold with cdk-nag, multi-env config, pytest tests |
Quick start:
Register in your project-config.md Installed Powers Registry:
| infrastructure | kiro-powers-aws-cdk-python | Infrastructure design, CDK/Python code generation |The AIDLC orchestrator activates this power automatically during Infrastructure Design and Code Generation stages.
See .kiro/powers/kiro-powers-aws-cdk-python/README.md for full documentation.
The awslabs.aws-iac-mcp-server is the official AWS IaC MCP server from the awslabs/mcp monorepo. It was chosen because:
- Official & maintained — Part of the AWS Labs open source MCP collection
- Complete CDK lifecycle — Research → code → synth → validate → deploy → troubleshoot
- Python first-class — Code samples support
language: "python"filtering - No credentials needed for 90% of workflows (docs, validation, compliance)
- Security baked in — cfn-lint + cfn-guard + CDK-NAG knowledge base
- Latest docs — Always-current CDK API reference and construct documentation