Skip to content

pydevsg/sudiviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”¬ sudiviz

Website Downloads PyPI License

X-ray vision for your cloud infrastructure

sudiviz visualizes your live AWS infrastructure as an interactive graph β€” across multiple regions. Auto-detects misconfigurations, unhealthy targets, and orphan resources β€” then fixes them with one command.

πŸš€ Zero AI tokens | πŸ’Έ Zero cost | 🐍 Pure Python | 🌍 Multi-region

Web Graph


πŸ“¦ Quick Start

pip install 'sudiviz[all]'

# Diagnose your infrastructure
sudiviz diagnose

# Explain findings in plain English (via Bedrock)
sudiviz explain

# Interactive web visualization
sudiviz graph --output web --open

# Auto-fix issues
sudiviz fix --apply

Auth: Uses standard boto3 credentials (~/.aws/credentials, env vars, SSO, or instance profile)


✨ Features

Feature Description
Live Topology Real-time graph of ALB β†’ Target Groups β†’ EC2 β†’ Security Groups
AWS Resource Icons Each node displays a colour-coded AWS-style icon (ALB, EC2, RDS, S3, ECS, EKS, Lambda, SG…)
Multi-Region Switch between AWS regions (us-east-1, us-west-2, eu-west-1, ap-northeast-1…) from a dropdown β€” no restart needed
Health Detection Unhealthy targets, failing health checks, orphan resources
Auto-Fix One-click remediation with sudiviz fix --apply
Traffic Animation Visualize request flow with animated pulses
Health Heatmaps Color-code infrastructure by health status
Cost Heatmap FinOps view β€” visualize estimated monthly costs per resource
Security Group Flows Visualize ingress/egress rules between security groups (blue = ingress, purple = egress)
CloudWatch Integration One-click links to metrics and logs for each resource
Dark/Light Mode Toggle theme in web UI
Cluster Grouping Group resources by service type (Load Balancers, ECS, Security, etc.)
Terraform Drift Compare live AWS vs Terraform state
Multi-Service ALB, EC2, ECS, EKS, RDS, Lambda, S3, Security Groups
Explain Send diagnostic findings to Amazon Bedrock (Nova Lite) for root-cause analysis and prioritised action plans
MCP Server AI agents can discover, diagnose, and fix infrastructure via natural language

🎨 Visualization Modes

Terminal

sudiviz diagnose --region us-east-1

TUI (Interactive Terminal)

sudiviz tui

Web (Cytoscape.js)

sudiviz graph --output web --port 8000 --open

# Specify a default region (switch regions live from the UI dropdown)
sudiviz graph --output web --region us-east-1 --port 8000 --open

PNG Export

sudiviz graph --output png --file topology.png

πŸ”§ Auto-Fix

sudiviz fix                    # Preview fixes (dry-run)
sudiviz fix --apply            # Apply all fixes
sudiviz fix 1 --apply          # Apply specific fix
sudiviz fix --apply --force    # Include destructive operations

Supported fixes:

  • Security group missing ingress rules
  • S3 public access / encryption
  • RDS public accessibility
  • Orphan target groups (with --force)
  • Unused security groups (with --force)

🧠 Explain (Amazon Bedrock)

Sends diagnostic findings to Amazon Bedrock (Nova Lite) for holistic, AI-powered analysis β€” root causes, connected dots across findings, and a prioritised action plan.

# General analysis of all findings
sudiviz explain

# Ask a specific question
sudiviz explain "why is my target group unhealthy?"
sudiviz explain "why do I have no resources in us-east-2?"

# With AWS options
sudiviz explain --region us-east-1 --profile prod

Requirements:

  • AWS credentials with bedrock:InvokeModelWithResponseStream permission (or AmazonBedrockFullAccess managed policy)
  • Amazon Nova Lite model access enabled in your region

Cost: ~$0.0001–0.0004 per invocation (Amazon Nova Lite pricing: $0.06/1M input tokens, $0.24/1M output tokens)


πŸ€– MCP Server (Agentic AI)

sudiviz ships an MCP server so AI agents (Claude Desktop, Claude Code, Cursor, etc.) can discover, diagnose, and remediate your infrastructure via natural language.

pip install 'sudiviz[mcp]'

# Start the MCP server (stdio transport)
sudiviz-mcp

Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "sudiviz": {
      "command": "sudiviz-mcp",
      "env": { "AWS_PROFILE": "production" }
    }
  }
}

Add to Claude Code (.mcp.json in your project root):

{
  "mcpServers": {
    "sudiviz": {
      "command": "sudiviz-mcp"
    }
  }
}

Available MCP tools:

Tool Description
sudiviz_discover Discover live AWS resources (ALB, EC2, RDS, Lambda, S3, …)
sudiviz_diagnose Discover + analyze for issues (orphans, unhealthy, misconfig)
sudiviz_graph Generate Cytoscape.js topology JSON
sudiviz_fix Generate or apply remediation commands
sudiviz_drift Compare Terraform state vs live AWS
sudiviz_costs Estimate monthly costs by service and resource
sudiviz_list_resources List resources by type (alb, instance, rds, …)

MCP Resources (read live data without calling a tool):

Resource URI Description
infra://aws/{region}/topology Live topology graph as Cytoscape JSON
infra://aws/{region}/health Health status summary with issue counts
infra://aws/{region}/costs Estimated monthly cost breakdown

MCP Prompts (guided multi-step workflows):

Prompt Description
diagnose-infrastructure Discover, diagnose, and recommend fixes
cost-optimization Find cost-saving opportunities
security-audit Check for open SGs, public DBs, unencrypted storage
incident-triage Trace unhealthy resources through dependency chain

Example conversations with your AI agent:

  • "Show me all orphan resources in us-east-1"
  • "What's our estimated monthly spend?"
  • "Fix the unhealthy targets on my ALB"
  • "Check for Terraform drift against my state file"
  • "Run a security audit on eu-west-1"
  • "Triage the incident β€” what's unhealthy and why?"

πŸ”’ Security

sudiviz is built with security in mind. Every release is scanned for vulnerabilities.

Check Status
Bandit SAST βœ… No issues
XSS Protection βœ… HTML sanitization enabled
Dependency CVEs βœ… All patched
Hardcoded Secrets βœ… None
Shell Injection βœ… No shell=True
Code Injection βœ… No eval()

Run security scan locally:

pip install bandit[toml]
bandit -c pyproject.toml -r sudiviz/

πŸ”„ Terraform Drift

terraform show -json > tfstate.json
sudiviz drift --tfstate tfstate.json

πŸ“Š CI Integration

# Fail CI on critical issues
sudiviz diagnose --json | jq '.diagnosis.fixes[] | select(.severity=="critical")'

# Drift detection gate
sudiviz drift --tfstate tfstate.json --json
Exit Code Meaning
0 No issues
1 Drift detected
2 Critical issues found

πŸ“Έ More Screenshots

Click to expand

AWS Resource Icons + Multi-Region Topology

Web Graph

Each node shows a colour-coded AWS icon. Switch regions live from the dropdown in the top bar (us-east-1, us-east-2, eu-west-1, us-west-2 and more).

Security Group Ingress/Egress Flows (Dark Mode)

Ingress Traffic

Terminal TUI

TUI

Diagnose Output

Diagnose

Auto-Fix Preview

Fix

Traffic Flow Animation (Dark Mode)

Traffic

Health Heatmap

Heatmap

Cluster Grouping (Dark Mode)

Cluster

Cost Heatmap (FinOps)

Cost


πŸ†š Comparison

Feature sudiviz Hava.io Cloudcraft
Live data βœ… ❌ ❌
AWS resource icons βœ… βœ… βœ…
Multi-region switcher βœ… βœ… βœ…
Auto-fix βœ… ❌ ❌
AI explain βœ… ❌ ❌
Traffic animation βœ… ❌ ❌
Health heatmaps βœ… ❌ ❌
Cost heatmap βœ… ❌ ❌
Cluster grouping βœ… ❌ ❌
Terraform drift βœ… ❌ ❌
Orphan detection βœ… ❌ ❌
MCP / AI agent βœ… ❌ ❌
Free & open source βœ… GPL-3.0 $29/mo $49/mo

πŸ” IAM Permissions

Read-only (sudiviz diagnose):

  • ReadOnlyAccess AWS managed policy

AI Explain (sudiviz explain):

  • AmazonBedrockFullAccess (or a scoped inline policy for bedrock:InvokeModel + bedrock:InvokeModelWithResponseStream)

Write (sudiviz fix --apply):

  • AmazonEC2FullAccess
  • ElasticLoadBalancingFullAccess
  • AmazonS3FullAccess
  • AmazonRDSFullAccess

πŸ“– Documentation

AWS Services Discovered
Service What's collected
ALB / NLB Load balancers, listeners, rules
Target Groups Health status per target
EC2 State, IPs, security groups
Security Groups Ingress/egress rules
ECS Clusters, services, task counts
EKS Clusters, node groups
RDS Instances, encryption, public access
Lambda Functions, VPC config
S3 Buckets, encryption, public access
Diagnostic Rules
Check Severity
Unhealthy targets critical
SG missing port from ALB critical
S3 public access open critical
RDS publicly accessible warning
Storage not encrypted warning
Orphan target group warning
Unused security group info
Architecture
sudiviz/
β”œβ”€β”€ cli.py           # Typer commands
β”œβ”€β”€ mcp_server.py    # MCP server for AI agents
β”œβ”€β”€ tui.py           # Textual TUI
β”œβ”€β”€ web.py           # FastAPI + WebSocket
β”œβ”€β”€ discovery/       # AWS discovery (boto3)
β”œβ”€β”€ graph/           # NetworkX + analyzers
β”œβ”€β”€ remediation/     # Auto-fix engine
└── web_templates/   # Cytoscape.js UI

πŸ“ License

GPL-3.0-or-later β€” see LICENSE


Built by @pydevsg

About

X-ray vision for your cloud infrastructure

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages