Transform your AWS infrastructure management with natural language commands! This guide will walk you through everything you need to know to start using the AI Infrastructure Agent effectively.
Note: This is Proof of Concept Project.
- How to set up and configure the AI Infrastructure Agent
- Step-by-step walkthrough of creating infrastructure with natural language
- Best practices for safe infrastructure management
- Advanced usage patterns and tips
Before diving in, make sure you have:
- ✅ AWS Account with appropriate IAM permissions
- ✅ Go 1.24.2+ installed on your system
- ✅ AI Provider API Key (OpenAI, Gemini, or Anthropic)
- ✅ Basic understanding of AWS services (EC2, VPC, Security Groups)
# Clone the repository
git clone https://github.com/VersusControl/ai-infrastructure-agent.git
cd ai-infrastructure-agent
# Run the automated installation script
./scripts/install.shThe installation script will handle everything for you:
- Install Go dependencies
- Build the applications
- Create necessary directories
- Set up configuration files
- Set up your AI provider API key:
# For OpenAI (recommended for beginners)
export OPENAI_API_KEY="your-openai-api-key-here"
# For Google Gemini
export GEMINI_API_KEY="your-gemini-api-key-here"
# For Anthropic Claude
export ANTHROPIC_API_KEY="your-anthropic-api-key-here"- Configure AWS credentials:
# Method 1: Using AWS CLI (recommended)
aws configure
# Method 2: Environment variables
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
export AWS_DEFAULT_REGION="us-west-2"- Edit configuration file:
nano config.yamlUpdate the configuration to match your preferences:
agent:
provider: "openai" # Your chosen AI provider
model: "gpt-4" # AI model to use
dry_run: true # Start with dry-run for safety
auto_resolve_conflicts: false
aws:
region: "us-west-2" # Your preferred AWS region
profile: "default"
web:
port: 8080 # Web dashboard portStart the web interface:
./scripts/run-web-ui.shOpen your browser and navigate to http://localhost:8080
The dashboard provides:
- Natural language input for infrastructure requests
- Visual execution plans before any changes
- Real-time monitoring of infrastructure operations
- State management and conflict detection
Let's create a simple web server infrastructure with a practical example.
In the web dashboard, enter this natural language request:
"Create an EC2 instance for hosting an Apache Server with a dedicated security group that allows inbound HTTP (port 80) and SSH (port 22) traffic."
The AI agent will:
- Parse your natural language request
- Identify required AWS resources
- Generate a detailed execution plan
- Show dependencies between resources
Review the plan carefully and click "Approve & Execute" when ready.
Watch as the agent:
- Executes steps in the correct order
- Handles dependencies automatically
- Provides real-time progress updates
- Reports any issues immediately
The agent maintains a complete state of your infrastructure:
- Resource inventory with relationships
- Change history and audit trail
- Cost tracking and optimization suggestions
- Drift detection from expected configuration
Try more complex infrastructure requests:
# Load-balanced web application
"Deploy a load-balanced web application with 2 EC2 instances behind an ALB in different availability zones"
# Complete development environment
"Set up a development environment with VPC, public and private subnets, NAT gateway, EC2 instances, and RDS MySQL database"
# Auto-scaling setup
"Create an auto-scaling group with 2-10 instances that scales based on CPU utilization above 70%"
# Secure environment
"Create a secure 3-tier architecture with web servers in public subnets, app servers in private subnets, and database in isolated subnets"Issue: AWS authentication fails
# Check AWS credentials
aws sts get-caller-identity
# Verify permissions
aws iam get-user
# Test basic access
aws ec2 describe-regionsIssue: AI provider API fails
# Check if API key is set
echo $OPENAI_API_KEY
# Test API connection
curl -H "Authorization: Bearer $OPENAI_API_KEY" https://api.openai.com/v1/modelsIssue: Web dashboard won't start
# Check what's using port 8080
lsof -i :8080
# Change port in config.yaml
web:
port: 8081 # Use different portIssue: AWS service limits reached
- Check AWS service quotas in AWS Console
- Request limit increases if needed
- Use different regions with available capacity
Issue: Slow AI responses
- Try a faster model (e.g.,
gpt-3.5-turboinstead ofgpt-4) - Reduce
max_tokensin configuration - Check your internet connection
- Begin with simple requests like single EC2 instances
- Gradually work up to complex multi-tier architectures
- Always use dry-run mode initially
- Include details like instance types, regions, and configurations
- Specify security requirements clearly
- Mention any compliance or performance requirements
- Always review execution plans before approval
- Check cost estimates against your budget
- Verify security group rules match your requirements
- Review past executions in the dashboard
- Learn from the agent's decision-making process
- Build a library of successful request patterns
Now that you're up and running:
- Experiment with different types of infrastructure requests
- Join the community discussions on GitHub
- Contribute improvements and bug fixes
- Share your successful patterns with others
- Stay updated with new features and improvements
Happy Infrastructure Management! 🎉
Remember: This is a PoC project. Always test in development environments first.
⭐ Star the Repository | 🐛 Report Issues | 💡 Request Features



