VPC Flow Logs and DNS logs are worth retaining because they reconstruct network paths, reveal unusual destinations, and show name resolution that often appears before or during compromise. Flow logs provide source, destination, port and action data, while DNS logs link activity to domains, subdomains and query patterns that support threat hunting and incident scoping.
Why these logs earn their keep in an investigation
Retention matters because these logs give investigators two different views of the same activity. Flow records show who talked to whom, on what port, and whether traffic was allowed or rejected. DNS logs show how that activity was resolved into domains and subdomains, which often helps turn an opaque IP into a meaningful lead, even when the destination later changes.
Used together, they reduce the gap between “something happened” and “what exactly happened.” That is especially useful when you need to reconstruct a sequence across cloud networking layers, endpoint telemetry, and alerting tools that may each show only part of the path.
What each log type contributes that the other cannot
Flow logs are strongest for path reconstruction, reachability, and directional behaviour. They help answer whether a host contacted an internal system, a public service, or an unusual port, and whether the connection was accepted, rejected, or short-lived. They are often the fastest way to confirm whether a suspicious endpoint was actually talking to something of interest.
DNS logs are strongest for naming context and intent. They can reveal repeated lookups, suspiciously generated domain names, lookups to newly seen domains, or DNS activity that appears before a connection becomes visible in flow data. That makes them valuable for spotting command-and-control, staging, and pre-exploitation reconnaissance patterns that would otherwise look like ordinary internet noise.
Flow logs also help expose blind spots in investigations. If a host reached an unexpected destination through NAT, a proxy, or a shared egress path, the network path can be ambiguous without retained telemetry. DNS logs can then provide the missing label that ties the traffic back to a domain family, a subdomain pattern, or a repeated query behaviour worth hunting across the environment.
How retained telemetry supports scoping and hunt work
For scoping, the main value is speed and confidence. A small set of preserved records can establish first-seen communications, adjacent systems that followed the same path, and whether the suspicious traffic was isolated or repeated across multiple hosts. That helps investigators separate a one-off false positive from a broader campaign.
For hunting, the logs provide a baseline of normal behaviour that can be queried later for deviations. Analysts can look for rare destinations, unusual query volumes, abnormal lookup timing, or traffic that does not match expected application patterns. The richer the retention window, the more likely it is that an early signal will still be available when a later incident triggers deeper review. For a broader view of how these telemetry sources support network investigation, the Network Monitoring and Packet Capture Guide is a useful companion.
Risk and Threat Considerations
These logs are worth keeping because attackers often rely on ordinary-looking network activity to hide staging, command-and-control, lateral movement, or data movement. DNS can be abused for reachability checks, domain generation, tunnelling, or simply to make later connections look routine. Flow logs can then provide the corroborating path data needed to distinguish benign chatter from a live abuse pattern.
Failure mechanism: If flow logs are too sparse, too short-lived, or missing key fields, investigators lose the ability to reconstruct paths and prove whether a destination was actually reached. If DNS logs are not retained, the environment may still show connections, but without the naming context that turns those connections into actionable leads.
Impact: The result is weaker scoping, slower containment, and a higher chance of missing early compromise signals that only become obvious when DNS and flow telemetry are reviewed together.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-13 — Network Monitoring and Defense | Retention of flow and DNS logs supports network monitoring, detection, and investigation. |
| Recommendation — Retain network telemetry that supports detection, scoping, and incident investigation. | ||
| NIST CSF 2.0 | DE.CM-01 — Networks and network services are monitored to detect potential cybersecurity events | Flow and DNS logs are monitoring data used to detect suspicious network activity. |
| DE.AE-02 — Detected events are analyzed to understand attack targets and methods | These logs help analysts interpret destinations, paths, and naming patterns during investigation. | |
| Recommendation — Monitor network and DNS activity with retained telemetry for anomaly detection. Analyze retained flow and DNS telemetry to reconstruct attack paths and scope. | ||
| NIST SP 800-53 Rev 5 | AU-12 — Audit Record Generation | The question centers on retaining telemetry needed for later investigation and evidence. |
| Recommendation — Generate and retain audit-worthy network records that support later investigations. | ||
| MITRE ATT&CK | T1071 — Application Layer Protocol | DNS logs help investigate DNS-based command and control and related abuse patterns. |
| Recommendation — Map DNS-based abuse to T1071 and hunt for command-and-control activity. | ||
Practitioner Guidance
What to verify: Make sure the retained records preserve enough fields to answer three questions later: source, destination, and resolution context. If a platform strips away action, port, query name, or timing detail, the log may exist but still be poor evidence for an investigation.
What to prioritise: Retention should favour the telemetry that is hardest to reconstruct after the fact. DNS and flow logs are most valuable when they are kept long enough to bridge the gap between alerting, triage, and deeper incident scoping, not just for short-term troubleshooting.
Practitioner takeaway: Keep both log types because each closes a different investigative gap, and neither is fully substitutable once an incident has moved past the initial alert.
Related resources from NHI Mgmt Group
- Guide: Cloud Network Security Guide
- VPC Flow Logs
- How should security teams ingest AWS VPC Flow Logs without overwhelming the SIEM or breaking the budget?
- How should security teams handle security data ingestion when AWS logs are spread across Security Lake, CloudTrail, VPC Flow, and third-party sources?
- What is the difference between restricting AWS security groups and relying on VPC flow logs?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org