Interview Prep/AWS/VPC and Network Design

How do you log network traffic in production without a huge bill?

IntermediateProductionVPC and Network Design
Answer

VPC Flow Logs to S3 in Parquet format with hourly partitions (much cheaper than CloudWatch Logs and query-able with Athena). Use a custom format with useful fields (vpc-id, subnet-id, pkt-srcaddr, pkt-dstaddr, flow-direction, traffic-path). Enable at VPC level in prod, and sample or disable in sandboxes. Lifecycle old logs to Glacier. Send only REJECT records to CloudWatch if you need real-time alerting.

aws All AWS questions Roadmap: AWS core services

More on VPC and Network Design