AWS Infrastructure as Code
Key Tools
- search_cdk_documentation / search_cdk_samples_and_constructs - CDK docs and code samples
- cdk_best_practices - Comprehensive CDK best practices
- read_iac_documentation_page - Full documentation pages
- validate_cloudformation_template - cfn-lint validation
- check_cloudformation_template_compliance - cfn-guard security compliance
- troubleshoot_cloudformation_deployment - Pattern-based failure analysis with CloudTrail
- search_cloudformation_documentation - CloudFormation docs
CDK Development Workflow
- Research: search_cdk_documentation + search_cdk_samples_and_constructs
- Best Practices: cdk_best_practices
- Write CDK Code
- Synthesize:
cdk synth - Validate: validate_cloudformation_template + check_cloudformation_template_compliance
- Deploy:
cdk deploy - Troubleshoot: troubleshoot_cloudformation_deployment (if needed)
Best Practices
- Prefer L2 constructs, use L3 for patterns, avoid L1 unless necessary
- Search before coding to find proven patterns
- Always synthesize (
cdk synth) to validate before deployment - Check compliance before production
- Supports TypeScript, Python, Java, C#, Go
MCP Server Config
{
"mcpServers": {
"aws-iac": {
"command": "uvx",
"args": ["awslabs.aws-iac-mcp-server@latest"],
"env": {
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "ERROR"
}
}
}
}
Most features work without AWS credentials. Credentials only needed for deployment and troubleshooting.