This directory contains comprehensive examples demonstrating the capabilities of the Enhanced CloudFormation MCP Server.
Simple examples to get you started with resource management and basic CloudFormation operations.
What you'll learn:
- List and manage AWS resources
- Create, update, and delete resources
- Basic CloudFormation stack operations
- Simple troubleshooting
Best for: Beginners, quick reference
Comprehensive guide for integrating with Amazon Q CLI and using natural language interactions.
What you'll learn:
- Q CLI setup and configuration
- Natural language conversations
- Context-aware assistance
- Advanced Q CLI features
Best for: Amazon Q users, conversational AI workflows
Advanced template generation from natural language descriptions with intelligent conversation flows.
What you'll learn:
- Multi-stage conversation flows
- Natural language to CloudFormation
- Architecture pattern recognition
- Compliance and security integration
Best for: Infrastructure architects, complex deployments
Complex deployment scenarios, multi-stack architectures, and enterprise patterns.
What you'll learn:
- Multi-stack deployments
- Cross-account architectures
- Enterprise patterns
- Advanced automation
Best for: Enterprise users, complex architectures
Comprehensive troubleshooting techniques, error analysis, and autonomous fixing capabilities.
What you'll learn:
- Error analysis techniques
- Autonomous fixing workflows
- CloudWatch and CloudTrail integration
- Recovery strategies
Best for: DevOps engineers, production support
New to CloudFormation? → Start with Basic Usage
Using Amazon Q CLI? → Go to Q CLI Integration
Need complex infrastructure? → Check Template Generation
Troubleshooting issues? → See Troubleshooting
Before running examples, ensure you have:
# Install the enhanced CFN MCP server
pip install enhanced-cfn-mcp-server
# Configure AWS credentials
aws configure
# Verify Q CLI integration (if using Q CLI)
q chat
"List my S3 buckets"| Category | Complexity | Time to Complete | Prerequisites |
|---|---|---|---|
| Basic Usage | Beginner | 15-30 minutes | AWS credentials |
| Q CLI Integration | Intermediate | 30-60 minutes | Q CLI installed |
| Template Generation | Intermediate | 45-90 minutes | CloudFormation knowledge |
| Advanced Workflows | Advanced | 1-3 hours | Enterprise AWS experience |
| Troubleshooting | Advanced | 30-120 minutes | Debugging experience |
- Basic Usage - Resource Management
- Basic Usage - Simple CloudFormation
- Template Generation - Simple Web App
- Troubleshooting - Basic Debugging
- Q CLI Integration - Setup
- Q CLI Integration - Conversations
- Template Generation - Natural Language
- Advanced Workflows - Q CLI Automation
- Template Generation - Microservices
- Advanced Workflows - Multi-Account
- Advanced Workflows - Compliance
- Troubleshooting - Production Support
- Basic Usage - All Operations
- Troubleshooting - All Techniques
- Advanced Workflows - CI/CD Integration
- Advanced Workflows - Monitoring
- Template Generation: Create templates from natural language
- Template Analysis: Analyze existing templates for improvements
- Best Practices: Apply AWS best practices automatically
- Error Analysis: Deep dive into CloudFormation failures
- Autonomous Fixing: Automatically fix and redeploy stacks
- Root Cause Analysis: Investigate issues with CloudWatch/CloudTrail
- Security Analysis: Detect vulnerabilities in templates
- Compliance Checking: Ensure HIPAA, PCI, SOX compliance
- Best Practices: Apply security best practices
- Drift Detection: Identify configuration drift
- Cost Optimization: Optimize infrastructure costs
- Monitoring: Set up comprehensive monitoring
The template-generation/samples/ directory contains:
- Simple S3 Template: Basic S3 bucket with versioning
- Cross-Account S3 Template: S3 bucket with cross-account access
- Web Application Template: Three-tier web application
- Microservices Template: Container-based microservices
- Data Pipeline Template: Serverless data processing pipeline
Each example includes:
- README.md: Detailed explanation and usage instructions
- Template Files: CloudFormation templates (YAML/JSON)
- Parameter Files: Example parameter configurations
- Scripts: Automation scripts and helpers
- Documentation: Architecture diagrams and explanations
# Test individual components
pytest examples/tests/unit/
# Test specific example
pytest examples/tests/unit/test_basic_usage.py# Test with mock AWS APIs
pytest examples/tests/integration/
# Test Q CLI integration
pytest examples/tests/integration/test_q_cli.py# Test with real AWS resources (requires credentials)
pytest examples/tests/live/ -m live
# Test specific workflow
pytest examples/tests/live/test_template_generation.py -m live-
AWS Credentials Not Configured
aws configure # or export AWS_ACCESS_KEY_ID=your_key export AWS_SECRET_ACCESS_KEY=your_secret
-
Q CLI Integration Issues
q configure # Check MCP server configuration -
Permission Errors
# Verify IAM permissions aws iam get-user aws sts get-caller-identity
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Ask questions and share experiences
- Documentation: Check the main README and docs
- Examples: Look for similar use cases in other examples
We welcome contributions of new examples! See CONTRIBUTING.md for guidelines.
- Clear README with usage instructions
- Working code with proper error handling
- Test cases for the example
- Documentation with architecture diagrams
- Integration with existing example structure
- Industry-Specific Templates: Healthcare, finance, retail
- Advanced Patterns: Event-driven architectures, serverless
- Integration Examples: Third-party tools, hybrid cloud
- Compliance Examples: Industry-specific compliance
- Cost Optimization: Advanced cost optimization techniques
Happy Learning! 🎉
Start with the examples that match your experience level and use case. Each example builds on previous concepts, so feel free to progress through them in order or jump to specific topics that interest you.