How rudrasecure/aws_neo4j_map works
Main Components
a) Data Collection Layer:
• Boto3 scripts (5 separate collectors) as individual components
• Each collector focuses on specific AWS resources:
• EC2 Instances
• Security Groups
• RDS Instances
• VPC Peering
• Application Load Balancers
b) Data Processing Layer:
• Neo4j update script that processes JSON outputs
• Data transformation logic
c) Storage Layer:
• Neo4j Graph Database with temporal data storage
d) AWS Infrastructure Layer:
• AWS services being queried
• IAM authentication component
┌─────────────────────────────────────────────────────────┐
• AWS Infrastructure │
• ┌─────────┐ ┌──────────┐ ┌────────┐ ┌───────┐ ┌─────┐ │
• EC2 │ │ RDS │ │ VPC │ │ ALB │ │ SG │ │
• ┘ └──────────┘ └────────┘ └───────┘ └─────┘ │
• ┘
• ▲
• (AWS API Calls)
┌─────────────────────────────────────────────────────────┐
• Data Collection Layer │
• ┌─────────┐ ┌──────────┐ ┌────────┐ ┌───────┐ ┌─────┐ │
• get_inst │ │get_rds │ │get_vpc │ │get_alb│ │get_sg│ │
• ┘ └──────────┘ └────────┘ └───────┘ └─────┘ │
• ┘
• ▼
• [JSON Files]
• ▼
┌─────────────────────────────────────────────────────────┐
• Data Processing Layer │
• ┌────────────────────────────────┐ │
• update_intelligence_db.py │ │
• ┘ │
• ┘
• ▼
┌─────────────────────────────────────────────────────────┐
• Neo4j Database │
• ┌──────────────────────────────────────────────────┐ │
• Graph Model │ │
• [Nodes] [Relationships] │ │
• Snapshot - CONTAINS │ │
• Region - BELONGS_TO │ │
• VPC - PEERED_TO │ │
• Instance - ALLOWED │ │
• SecurityGroup - TAGGED │ │
• ┘ │
• ┘
Important Elements to Highlight
• Blue: AWS Services
• Green: Data Collection Scripts
• Yellow: Processing Components
• Red: Database Layer
• Purple: Data Flow Lines
• Clear labels for:
• IAM permissions required (SecurityAudit and ViewOnlyAccess)
• Temporal data aspects (Snapshot nodes)
• Data flow directions
• File formats (JSON) between layers
Additional Details
• Notes about the periodic execution nature
• Integration points for SIEM tools
• Where environment variables (.env) are used
Technical Notes
• Use standardized UML or C4 model notation
• Version information for major components
• Error handling and retry mechanisms
• Where configuration is required
Remember to maintain a balance between showing enough detail to understand the system's architecture while not overwhelming the viewer with implementation-specific details.