Course contentsShow
← Security
Lesson 1872 of 3,05238. Cloud Security - Monitoring and IRFree lesson

VPC Flow Logs and Network Monitoring

Enabling and analyzing VPC Flow Logs to monitor network traffic patterns and detect suspicious connection attempts.

VPC Flow Logs and Network Monitoring

You'll learn how VPC Flow Logs capture network traffic metadata to detect suspicious patterns and connection attempts in your cloud infrastructure.

What Are VPC Flow Logs?

VPC Flow Logs are like security camera footage for your network traffic. They capture metadata about every IP packet flowing through your VPC—who's talking to whom, which ports they're using, and whether connections succeed or fail. Unlike packet capture tools that record full content, Flow Logs record connection information: source/destination IPs, ports, protocols, packet counts, and accept/reject decisions.

Think of it as your network's phone bill rather than recorded conversations—you see who called whom and for how long, but not what was said.

Enabling Flow Logs

You can enable Flow Logs at three levels:

  • VPC-wide: Monitor all network interfaces in the entire VPC
  • Subnet-level: Focus on specific subnet traffic
  • Network interface: Track individual resource traffic

Logs typically ship to CloudWatch Logs or S3 buckets for analysis.

Analyzing for Security Threats

Flow Logs reveal critical security patterns:

Rejected connections: A spike in rejected traffic to specific ports may indicate port scanning or brute-force attempts. For example, hundreds of rejected SSH attempts (port 22) from a single IP signals an attack.

Unusual traffic patterns: Communication with unexpected regions, connections to known malicious IPs, or data exfiltration attempts (high outbound traffic volumes) become visible.

Lateral movement: Unexpected connections between internal resources may reveal compromised instances pivoting through your network.

Protocol anomalies: Traffic on non-standard ports for specific services can indicate malware command-and-control channels.

Monitoring Best Practices

Enable Flow Logs across all critical VPCs, integrate with automated analysis tools, set up alerts for suspicious patterns, and retain logs according to compliance requirements (typically 90+ days).

Key Takeaway: VPC Flow Logs provide essential network visibility for detecting reconnaissance, attacks, and anomalous behavior by recording who connects to what, when, and whether those connections are allowed—forming your first line of defense in network monitoring.