Traffic Analysis
Overview
Traffic Analysis provides insights into your network traffic by analyzing VPC Flow Logs. See who's talking to whom, identify security issues, and understand bandwidth usage.
Requires VPC Flow Logs Setup to be completed first.
Features
Top Talkers
See the most active communication patterns:
- Source → Destination: Which resources are communicating
- Bandwidth: Total bytes transferred
- Protocol: TCP, UDP, ICMP
- Ports: Destination ports being accessed
- Connections: Number of flow records
Top Talkers shows the last 24 hours of traffic, refreshed every 6 hours automatically.
Rejected Traffic
Identify blocked traffic (security issues):
- Source/Destination IPs: Where rejected traffic originates
- Ports: Which ports are being blocked
- Reject Count: How many attempts were blocked
- Protocol: Which protocols are rejected
Common causes:
- Security group rules blocking traffic
- Network ACL rules denying traffic
- Misconfigured routing
Flow Diagram
Visual representation showing:
- Resources as nodes (EC2, RDS, ALB, etc.)
- Traffic flows as lines between nodes
- Bandwidth as line thickness
- Bidirectional traffic in purple
- Click nodes to see details
Using Traffic Analysis
Loading Flow Logs
- Go to Traffic Analysis
- Select an AWS account
- Click Load Flow Logs (first time only)
- Wait ~30 seconds for analysis
Viewing Data
The page has three tabs:
- Top Talkers: Most active conversations
- Rejected Traffic: Blocked traffic attempts
- Flow Diagram: Visual network topology with traffic
Refreshing Data
- Auto-refresh: Every 6 hours via background jobs
- Manual: Click "Refresh" button
- On-demand: Click "Load Flow Logs" to re-query Athena
Understanding the Data
Traffic Enrichment
CloudWrangler enriches flow logs with resource information:
IP Address → Resource Name
10.0.1.45→web-server-1 (i-abc123)10.0.2.89→prod-database (db-xyz789)
This makes traffic analysis much easier than reading raw IPs.
Protocol Numbers
Common protocols:
6= TCP17= UDP1= ICMP
Action Types
ACCEPT= Traffic allowedREJECT= Traffic blocked by security group or NACL
Use Cases
Security Monitoring
Identify security issues:
- Unauthorized access attempts (rejected traffic)
- Unexpected communication patterns
- Port scanning attempts
- Traffic to/from unknown IPs
Performance Troubleshooting
Diagnose performance issues:
- Identify bandwidth-heavy resources
- Find chatty database connections
- Detect inefficient communication paths
- Track cross-AZ traffic (costs money)
Capacity Planning
Understand usage patterns:
- Peak traffic times
- Growing bandwidth needs
- Underutilized resources
- Network bottlenecks
Cost Optimization
Reduce costs by:
- Finding cross-region traffic (expensive)
- Identifying NAT Gateway usage (per-GB charges)
- Detecting unnecessary traffic
- Optimizing VPC Endpoints usage
Best Practices
Follow these practices for effective traffic analysis:
- ✅ Enable Flow Logs: For all production VPCs
- ✅ Review Regularly: Check rejected traffic weekly
- ✅ Set Baselines: Understand normal traffic patterns
- ✅ Alert on Anomalies: Unusual patterns may indicate issues
- ✅ Document Findings: Track security incidents
Limitations
- Delay: Flow logs have 5-10 minute delay
- Sampling: High-traffic resources may be sampled
- Retention: CloudWrangler stores last 24 hours by default
- Costs: Athena queries cost $5/TB scanned (~$0.01/day typical)