Study guide

2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs

AWS Certified Security – Specialty SCS-C03

Track your progress as you read

Finished sections get a check mark.

1 Chapter 0: Getting Started with the SCS-C03 Exam

0.1 SCS-C03 Exam Format, Domains & Study Strategy

2 Chapter 1: Security Monitoring, Alerting & Threat Detection Services

1.1 Workload Monitoring & Health Check Strategies 1.2 Amazon GuardDuty Architecture & Finding Types 1.3 AWS Security Hub & Automated Conformance Assessment 1.4 Amazon Macie & Automated Data Classification

3 Chapter 2: Enterprise Logging Architecture & Analysis

2.1 Multi-Account CloudTrail & Organization Trails 2.2 Amazon Security Lake & OCSF Log Normalization 2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs 2.4 Troubleshooting Security Telemetry & Log Ingestion 2.5 Analyzing, Normalizing & Correlating Security Logs

4 Chapter 3: Incident Readiness, Response Planning & Automated Runbooks

3.1 Incident Response Planning & Blast Radius Mitigation 3.2 Testing & Validating Incident Response Plans 3.3 Automated Incident Remediation with EventBridge & Step Functions 3.4 Systems Manager OpsCenter & Incident Manager Runbooks

5 Chapter 4: Digital Forensics, Evidence Preservation & Root Cause Analysis

4.1 Forensic Artifact Capture & Chain of Custody 4.2 Threat Containment & Network Quarantine Techniques 4.3 Correlating Events & Root Cause Analysis with Amazon Detective

6 Chapter 5: Edge Protection, WAF & DDoS Mitigation

5.1 CloudFront Security Headers & Origin Access Control 5.2 AWS WAF Architecture & Advanced Rule Sets 5.3 AWS Shield Advanced & DDoS Defense Architectures 5.4 Edge Integrations: Managed Rule Groups, OCSF Ingestion, IoT Policies & CORS

7 Chapter 6: Compute Workload Hardening, Vulnerability Management & GenAI Security

6.1 Golden AMIs & Container Image Hardening Pipelines 6.2 Amazon Inspector Vulnerability Management & Patch Automation 6.3 Generative AI Security: Amazon Bedrock Guardrails & Model Protection 6.4 Instance Profiles, Service Roles & Execution Roles for Compute 6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect

8 Chapter 7: Network Security, Segmentation, Private Connectivity & Encryption in Transit

7.1 Layered Traffic Filtering: SGs, NACLs & AWS Network Firewall 7.2 Hybrid Connectivity Security: VPN, Direct Connect & MACsec 7.3 Zero-Trust Access & Network Access Analysis 7.4 Enforcing Encryption in Transit: ELB Security Policies, TLS & HTTPS-Only Access 7.5 Private Access: VPC Endpoints, PrivateLink, Client VPN & Verified Access 7.6 Inter-Resource Encryption in Transit: Nitro, EMR, EKS & SageMaker AI

9 Chapter 8: Enterprise Authentication, Federation & Directory Services

8.1 AWS IAM Identity Center & Enterprise IdP Integration 8.2 Amazon Cognito User Pools & Identity Pools 8.3 AWS Security Token Service (STS) & Temporary Credential Workflows 8.4 Troubleshooting Identity & Authentication Failures

10 Chapter 9: Advanced Authorization Architecture & Policy Evaluation

9.1 Complete AWS Policy Evaluation Logic & Decision Flow 9.2 Permission Boundaries & Safe Admin Delegation 9.3 Attribute-Based Access Control (ABAC) with IAM Tags

11 Chapter 10: Least Privilege, Policy Validation & External Access Auditing

10.1 IAM Roles Anywhere & Amazon Verified Permissions 10.2 Auditing External & Unused Access with IAM Access Analyzer 10.3 Analyzing Authorization Failures & Policy Simulation

12 Chapter 11: Cryptographic Services: KMS Architecture & Key Governance

11.1 AWS KMS Architecture, Key Policies & Key Types 11.2 KMS Grants, Encryption Context & Multi-Region Keys 11.3 Imported Key Material (BYOK) & CloudHSM Key Stores

13 Chapter 12: Secrets Management, Sensitive Data Masking & PKI

12.1 AWS Secrets Manager & Systems Manager Parameter Store 12.2 Sensitive Data Masking in Telemetry & Messaging 12.3 AWS Certificate Manager (ACM) & Private CA Architecture

14 Chapter 13: Storage Encryption, Integrity, Lifecycle & Backup Protection

13.1 S3 Encryption Modes & S3 Bucket Keys 13.2 Data Integrity Protection: Object Lock, Vault Lock & Code Signing 13.3 Secure Data Lifecycle, Cross-Account Replication & Backup Vault Lock 13.4 Lifecycle, Backup & Secure Replication Beyond S3: EFS, FSx, DLM, DataSync & Air-Gapped Vaults

15 Chapter 14: Multi-Account Architecture, Organizations & Control Tower Governance

14.1 AWS Organizations Structure, Hierarchy & Resource Control 14.2 AWS Control Tower Landing Zone & Guardrail Framework 14.3 Delegated Administrator Architecture & Root User Governance 14.4 Centralized Resource Sharing with RAM & Service Catalog

16 Chapter 15: Compliance Automation, Infrastructure as Code Security & Auditing

15.1 Infrastructure as Code Security & Multi-Account Deployment 15.2 AWS Config, Conformance Packs & Automated Remediation 15.3 Audit Evidence Collection & Well-Architected Security Reviews

2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs

Key Takeaways Explain This Topic AI

VPC Flow Logs capture IP traffic across network interfaces, subnets, or VPCs with zero impact on network latency or compute instance throughput.

Custom VPC Flow Log formats enable forensic visibility by capturing extended fields including pkt-srcaddr, pkt-dstaddr, flow-direction, traffic-path, and tcp-flags.

VPC Flow Logs have critical capture exclusions: they do not record traffic to the Amazon DNS resolver (.2 IP), IMDS (169.254.169.254), DHCP, or Windows activation services.

Route 53 Resolver query logging records all DNS queries originating within VPCs, enabling detection of DNS tunneling, domain generation algorithms (DGAs), and C2 callback infrastructure.

CloudWatch Logs Insights queries provide real-time threat hunting syntax to identify port scans, rejected connection surges, and high-volume data exfiltration beaconing.

Last updated: September 2026

Foundations of Network Telemetry in AWS

Network telemetry forms the first line of defense in detecting unauthorized perimeter reconnaissance, lateral movement, data exfiltration, and command-and-control (C2) communication. In AWS, network traffic inspection relies primarily on two complementary telemetry streams:

Amazon VPC Flow Logs : Captures IP traffic flow metadata for Elastic Network Interfaces (ENIs), subnets, and VPCs. The companion Transit Gateway Flow Logs feature records the same kind of metadata at the transit gateway, per attachment, which is where inter-VPC and hybrid (VPN or Direct Connect) traffic is visible in a hub-and-spoke network. Both publish to CloudWatch Logs, Amazon S3, or Amazon Data Firehose.

Amazon Route 53 Resolver Query Logs : Captures internal DNS resolution queries submitted to the Amazon-provided DNS resolver ( Route 53 Resolver or the VPC .2 address).

Both services operate out-of-band at the hypervisor layer. They introduce zero impact on network latency, packet throughput, or compute instance performance.

VPC Flow Logs Architecture & Capture Mechanics

VPC Flow Logs can be attached at three hierarchical levels:

Individual ENI : Captures traffic on a single virtual network card.

Subnet : Automatically captures traffic across all existing and future ENIs within the subnet.

VPC : Automatically captures traffic across all existing and future ENIs across all subnets in the VPC.

Aggregation Intervals & Destinations

Aggregation Window : Flow logs aggregate packets into connection records. The default aggregation interval is 10 minutes . For security monitoring and incident response, you should always configure a 1-minute aggregation interval to capture high-frequency bursts, port scans, and short-lived connections with lower detection latency.

Delivery Destinations :

Amazon CloudWatch Logs : Ideal for real-time metric filters, CloudWatch alarms, and interactive threat hunting via CloudWatch Logs Insights.

Amazon S3 : Optimal for cost-effective, long-term archival, compliance evidence storage, and Athena/Security Lake analytics.

Amazon Data Firehose : Designed for streaming delivery to third-party real-time SIEMs and streaming analytics platforms.

Anatomy of Flow Log Fields: Default vs. Custom Formats

The default format includes 14 basic network fields. However, the default format is insufficient for advanced security forensics because it obscures packet paths and middlebox transformations. Security engineers must deploy custom format flow logs to capture advanced metadata.

Field Name Type Description Forensic Importance

version Integer VPC Flow Log version. Identifies format versioning.

account-id String AWS account ID of the ENI owner. Multi-account attribution.

interface-id String ENI identifier (e.g., eni-0123456789abcdef0 ). Pinpoints the exact affected resource.

srcaddr / dstaddr IPv4/IPv6 Source and destination IP of the flow. For ENIs behind NAT or middleboxes, these reflect interface-local IPs.

srcport / dstport Integer Source and destination port numbers. Identifies target application service or ephemeral egress port.

protocol Integer IANA protocol number (e.g., 6=TCP, 17=UDP, 1=ICMP). Distinguishes transport protocol.

packets / bytes Integer Total packets and bytes transferred during the window. Identifies data volume and exfiltration magnitude.

action String ACCEPT or REJECT . Indicates whether Security Groups or NACLs permitted or denied the traffic.

log-status String OK , NODATA , or SKIPDATA . SKIPDATA indicates internal AWS capacity limits dropped records.

pkt-srcaddr IPv4/IPv6 Real packet source IP address . Critical : Reveals original client IP even after traversing a NAT gateway.

pkt-dstaddr IPv4/IPv6 Real packet destination IP address . Critical : Reveals true target IP before middlebox translation.

flow-direction String ingress or egress . Distinguishes whether connection was initiated inbound or outbound.

traffic-path Integer Path taken by egress traffic (e.g., 1 = another resource in the same VPC, 2 = internet gateway or gateway VPC endpoint, 3 = virtual private gateway, 4 or 5 = intra- or inter-Region peering, 7 = gateway VPC endpoint, 8 = internet gateway). Exposes anomalous network routing and unauthorized path traversal.

tcp-flags Integer Bitmask of TCP flags observed during the aggregation window. Detects SYN floods, port scans, and incomplete handshakes.

The pkt-* vs. srcaddr / dstaddr Distinction

At a middlebox such as a NAT gateway , srcaddr and dstaddr describe the network interface's view of each hop, while pkt-srcaddr and pkt-dstaddr preserve the original packet addresses. On the NAT gateway's network interface, the record for traffic arriving from a private instance shows srcaddr = the instance IP but dstaddr = the NAT gateway's own private IP; only pkt-dstaddr shows the real internet destination. The onward records show srcaddr = the NAT gateway's IP. Adding pkt-srcaddr and pkt-dstaddr to a custom format lets one record tie the internal instance IP to the external C2 address, so responders isolate the right host.

Decoding tcp-flags for Threat Hunting

The tcp-flags field represents a bitmask of TCP control bits:

2 (SYN): Connection initiation.

18 (SYN-ACK: 2 + 16): Response from open port.

4 (RST): Connection refused / reset.

1 (FIN): Normal connection teardown.

If a flow log shows action: REJECT and tcp-flags: 2 across hundreds of sequential ports, an external actor is actively conducting a TCP SYN port scan against the host.

Critical Blind Spots: What VPC Flow Logs DO NOT Capture

A critical objective on the AWS Security Specialty exam is knowing the operational limitations and blind spots of VPC Flow Logs. Flow logs do NOT record the following categories of traffic:

Amazon Route 53 Resolver Queries : Traffic to the VPC DNS resolver ( 169.254.169.253 or the VPC network base address plus two, e.g., 10.0.0.2 ) is explicitly omitted from VPC Flow Logs.

Instance Metadata Service (IMDS) : Traffic to the link-local address 169.254.169.254 is not logged by VPC Flow Logs.

Amazon Time Sync Service : Traffic to 169.254.169.123 is excluded.

DHCP Traffic : Communications between instances and the Amazon VPC DHCP server are omitted.

Windows License Activation : Traffic to AWS Windows licensing servers is not recorded.

Exam Trap : If an exam scenario describes an attacker performing DNS tunneling or exfiltrating data via DNS queries to the VPC .2 resolver, reviewing VPC Flow Logs will reveal nothing . You must enable Route 53 Resolver Query Logging to gain visibility into DNS traffic.

Route 53 Resolver Query Logging

Amazon Route 53 Resolver Query Logs record every DNS query initiated by resources within your VPCs (EC2 instances, Lambda functions in VPCs, ECS tasks, and EKS pods) directed to the Route 53 Resolver.

Query Log Attributes

Route 53 Resolver query logs are output in JSON format containing crucial threat hunting attributes:

query_timestamp : Exact timestamp of the DNS query.

query_name : The fully qualified domain name (FQDN) requested (e.g., malicious-c2.attacker-domain.com ).

query_type : Resource record type requested (e.g., A , AAAA , TXT , CNAME ).

rcode : DNS response code ( NOERROR , NXDOMAIN , SERVFAIL , REFUSED ).

answers : The DNS answer payload returned, including resolved IP addresses.

srcaddr : The private IP of the ENI that submitted the DNS query.

firewall_rule_action : When a Route 53 Resolver DNS Firewall rule with an alert or block action matched, the action applied ( ALERT or BLOCK ), alongside firewall_rule_group_id and firewall_domain_list_id .

Threat Hunting with DNS Telemetry

Detecting DNS Tunneling : Attackers encapsulate stolen data (credit cards, credentials) into encoded subdomains (e.g., base64data.exfil.attacker.com ) and issue DNS lookups. Query logs capture these queries, revealing unusually long subdomain strings, high entropy, and an excessive volume of TXT queries.

Detecting Domain Generation Algorithms (DGAs) : Malware infected hosts often query hundreds of algorithmically generated domain names daily seeking active C2 servers. Query logs reveal high volumes of consecutive NXDOMAIN (Non-Existent Domain) responses originating from a single internal IP.

Threat Hunting with CloudWatch Logs Insights

When flow logs and DNS query logs are streamed to CloudWatch Logs, CloudWatch Logs Insights provides an interactive, highly scalable query engine to hunt for threats.

Query 1: Hunting for Inbound Port Scans & Brute Force Reconnaissance

Identifies external IP addresses generating the highest volume of rejected connections: fields @timestamp, srcAddr, dstPort, protocol

  • | filter action = "REJECT"
  • | stats count(*) as rejectCount by srcAddr, dstPort
  • | sort rejectCount desc
  • | limit 20
  • Query 2: Hunting for High-Volume Outbound Data Exfiltration

Aggregates outbound bytes transferred to non-RFC1918 public IP addresses to identify potential data exfiltration: fields @timestamp, srcAddr, dstAddr, dstPort, bytes

| filter flowDirection = "egress" and action = "ACCEPT"

| filter not (isIpv4InSubnet(dstAddr, "10.0.0.0/8") or isIpv4InSubnet(dstAddr, "172.16.0.0/12") or isIpv4InSubnet(dstAddr, "192.168.0.0/16"))

  • | stats sum(bytes) as totalBytesSent by srcAddr, dstAddr, dstPort
  • | sort totalBytesSent desc
  • | limit 25
  • Query 3: Hunting for High-Volume NXDOMAIN Spikes in Route 53 Resolver Logs

Identifies internal hosts generating excessive NXDOMAIN errors indicative of DGA malware: fields @timestamp, srcaddr, query_name, rcode

  • | filter rcode = "NXDOMAIN"
  • | stats count(*) as nxCount by srcaddr
  • | sort nxCount desc
  • | limit 15

Loading diagram... VPC Network Telemetry Pipeline & Threat Hunting Flow