Interview Prep/Networking/VPC & Network Architecture

What are VPC flow logs and what do they show?

BeginnerProductionVPC & Network Architecture
Answer

Metadata records of IP traffic at ENI, subnet or VPC level: source and destination IP and port, protocol, bytes, packets, action ACCEPT or REJECT, and (in v5) additional fields like pkt-srcaddr, flow-direction and tcp-flags. They show no payload.

We ship them to S3 in Parquet and query with Athena, for example "who is hitting REJECT on port 22".

SELECT srcaddr, count(*) c FROM vpc_flow_logs
WHERE action='REJECT' AND dstport=22 GROUP BY srcaddr ORDER BY c DESC LIMIT 20;
All Networking questions Roadmap: Networking for DevOps

More on VPC & Network Architecture