Enabling VPC Flow Logs Analysis
Complete guide to enabling and configuring VPC Flow Logs for network traffic analysis
What are VPC Flow Logs?
VPC Flow Logs is an AWS feature that captures information about the IP traffic going to and from network interfaces in your VPC. Each flow log record represents a network flow in your VPC during a specific capture window.
CloudWrangler analyzes these logs to provide powerful traffic analysis capabilities:
- Visualize traffic patterns between resources
- Identify top talkers by bandwidth
- Detect rejected traffic (security issues)
- Troubleshoot connectivity problems
- Analyze database and cache connectivity
- Search historical network traffic
VPC Flow Logs integration is optional but required for traffic analysis features in CloudWrangler.
Why Enable VPC Flow Logs?
VPC Flow Logs unlock several advanced CloudWrangler features:
Traffic Flow Visualization See real-time (6-hour delay) traffic flows in the Infrastructure Diagram, helping you understand how your resources communicate.
Security Analysis Identify rejected connections that may indicate misconfigured security groups, attempted intrusions, or application errors.
Bandwidth Monitoring Track which resources are generating the most traffic and optimize accordingly.
Compliance and Auditing Search historical network traffic for compliance audits or security investigations with VPC Flow Logs Search.
Troubleshooting Quickly identify connectivity issues between resources by analyzing actual traffic patterns.
Benefits
Operational Visibility
- Understand your actual network topology (not just configured)
- Identify unexpected communication paths
- Detect orphaned resources
Security Monitoring
- Detect port scanning attempts
- Identify unauthorized access attempts
- Find misconfigured security groups
- Track data exfiltration
Cost Optimization
- Identify unnecessary NAT Gateway traffic
- Find resources that could use VPC endpoints
- Optimize inter-AZ data transfer
Performance Analysis
- Identify network bottlenecks
- Analyze database connection patterns
- Optimize load balancer configurations
Setup Process
CloudWrangler makes it easy to set up VPC Flow Logs with a guided, three-step process.
Step 1: Discovery
CloudWrangler automatically scans your AWS account to detect existing VPC Flow Logs configurations.

What CloudWrangler Checks:
- Existing VPC Flow Logs configurations
- S3 buckets with flow log data
- Flow log format (Parquet vs plain text)
- Athena database configuration
- IAM permissions
Discovery Results:
- Found: Existing flow logs detected, shows configuration details
- Not Found: No flow logs configured, shows setup options
- Partial: Some VPCs have flow logs, others don't
Click Continue to proceed to the template deployment step.
Step 2: Deploy Template
If flow logs aren't configured or need additional permissions, CloudWrangler provides a CloudFormation template.

What the Template Creates:
The CloudFormation template sets up everything needed for VPC Flow Logs analysis:
-
S3 Bucket (if needed)
- Named:
cloudwrangler-flow-logs-{account-id} - Configured for Parquet format
- Lifecycle policies for cost optimization
- Named:
-
VPC Flow Logs
- Enabled for all VPCs in the region
- Parquet format (required by CloudWrangler)
- 1-minute aggregation interval
- Captures all traffic (accepted and rejected)
-
IAM Role for CloudWrangler
- Read access to the flow logs S3 bucket
- Athena query permissions
- Glue catalog access for metadata
-
Athena Configuration
- Glue database:
vpc_flow_logs - Table definitions for Parquet data
- Query result bucket
- Glue database:
Deployment Options:
Option A: CloudFormation Console (Recommended)
- Click Launch CloudFormation Stack
- Review the template in AWS Console
- Check "I acknowledge that AWS CloudFormation might create IAM resources"
- Click Create Stack
- Wait 3-5 minutes for completion
- Return to CloudWrangler
Option B: AWS CLI
Template Customization:
You can customize the template parameters:
FlowLogBucketName- Use an existing S3 bucketRetentionDays- How long to keep flow logs (default: 30)VPCIds- Specific VPCs to monitor (default: all)TrafficType- ALL, ACCEPT, or REJECT (default: ALL)
Flow logs must use Parquet format. CloudWrangler cannot read plain text flow logs.
Step 3: Verification
After deploying the CloudFormation template, CloudWrangler verifies the setup.

Verification Process:
CloudWrangler performs these checks:
- IAM Role Access - Verify CloudWrangler can assume the role
- S3 Bucket Access - Test read permissions on the flow logs bucket
- Athena Configuration - Check database and tables exist
- Flow Log Data - Verify Parquet files are being written
- Query Test - Run a sample Athena query
This takes 30-60 seconds.

Success State:
When verification succeeds, you'll see:
- Green checkmark on all verification steps
- Summary of flow logs configuration
- Link to view traffic in Infrastructure Diagram
- Link to Flow Logs Search
What Happens Next:
CloudWrangler will:
- Query flow logs every 6 hours
- Process and aggregate traffic data
- Enrich logs with resource information
- Make data available in the UI
Flow logs have a 10-15 minute delay from AWS. Your first traffic data will appear within 20-30 minutes of enabling flow logs.
Cost Considerations
Important: VPC Flow Logs have AWS costs. Please review before enabling.
VPC Flow Logs are a paid AWS feature with the following cost components:
- VPC Flow Logs ingestion: AWS charges per GB of flow log data
- S3 storage: Standard S3 storage costs
- Athena queries: CloudWrangler uses Athena to query logs in your account
For accurate and up-to-date pricing information, please refer to AWS VPC Flow Logs Pricing.
Start with a single VPC to test and estimate costs before rolling out to all VPCs.
Troubleshooting
No Flow Logs Appearing
-
Check flow log status:
Status should be
ACTIVE. -
Wait 10-15 minutes: Flow logs aren't instant
-
Verify bucket permissions: Flow logs service needs write access
-
Check CloudWatch Logs: Errors appear in
/aws/vpc/flowlogs
CloudWrangler Can't Read Flow Logs
-
Verify IAM role deployed:
-
Check file format: MUST be Parquet (not plaintext)
-
Test Athena manually:
-
Check S3 path: Should be
AWSLogs/{account-id}/vpcflowlogs/{region}/...
No Traffic Showing
- Verify resources have traffic: Ping between EC2 instances
- Check flow log filter: Should be
ALL(not justREJECT) - Wait for Athena: First query takes 30-60 seconds
- Verify resource discovery: Resources must be discovered first
Advanced Configuration
Multi-Region Flow Logs
Enable flow logs in all regions to single bucket:
Custom Log Format
Include additional fields:
Organization-Wide Deployment
Use AWS Organizations and CloudFormation StackSets to deploy flow logs across all accounts.
What You Can Analyze
Once flow logs are enabled:
Traffic Analysis Page
- Top Talkers: Resources generating most traffic
- Rejected Traffic: Blocked by security groups/NACLs
- Protocol Breakdown: TCP, UDP, ICMP traffic
- Port Usage: Most common destination ports
Infrastructure Diagram
- Traffic Flows: Visual lines showing communication
- Bandwidth: Line thickness = traffic volume
- Direction: Arrows show traffic direction
- Bidirectional: Purple lines for two-way traffic
Security Insights
- Identify unauthorized traffic attempts
- Detect port scanning
- Find misconfigured security groups
- Track inbound/outbound patterns