The edge is the first surface that absorbs traffic the operator does not control. Designing edge protection means matching each attack class to a service that operates at the right OSI layer, in the right administrative scope, with the right log surface. A threat model that includes volumetric Layer 3 and Layer 4 floods, application-layer abuse, DNS-driven exfiltration, and direct origin probing demands a layered stack that begins with Amazon CloudFront for distribution, AWS Shield for volumetric absorption, AWS WAF for HTTP semantics, AWS Network Firewall for VPC ingress and egress inspection, and Route 53 Resolver DNS Firewall for outbound DNS control. None of these services replaces the others; each closes a specific gap, and the exam tests whether the candidate can map a stated attack scenario to the right combination.
CloudFront places the AWS edge between the client and the origin. The distribution sits on the AWS backbone, terminates TLS at the edge, and caches static or dynamic content close to viewers. The security value extends beyond performance: traffic that lands on the AWS edge is shielded by Shield Standard by default, can be filtered by WAF web ACLs attached to the distribution, can be locked to specific origins through origin access control (OAC) signed requests, and can have its origin made unreachable from the public internet. When a workload sits behind an Application Load Balancer (ALB), pairing CloudFront with a security group that only allows the AWS-managed prefix list com.amazonaws.global.cloudfront.origin-facing collapses the public attack surface from the ALB to the edge. Direct origin access is then a misconfiguration, not a default.
Shield comes in two tiers. Shield Standard is automatic for every AWS account and protects against the most common Layer 3 and Layer 4 floods at the network border. Shield Advanced is a paid subscription that adds detection telemetry, near real-time attack visibility through the AWS Shield Response Team (SRT), cost protection for scale-out caused by attack absorption, the ability to enroll specific resources (CloudFront distributions, Global Accelerator accelerators, ALBs, Network Load Balancers, Elastic IPs, Route 53 hosted zones), and integration with WAF for automatic application-layer mitigations. Shield Advanced is the right call when the workload is mission-critical, when an attack triggering scale-out would cause real cost exposure, or when 24x7 SRT engagement is part of the runbook. It is not the right call for a low-criticality internal tool.
💡 Exam Trap: Shield Standard already covers every account against common L3 and L4 floods; questions that ask whether Shield Advanced is required to defend a CloudFront distribution against a generic SYN flood are wrong if the only need is automatic, non-interactive mitigation. The differentiators that justify Shield Advanced are SRT access, cost protection, application-layer integration with WAF, and protection group analytics.
AWS WAF is the Layer 7 control. A WAF web ACL holds a sequence of rules and rule groups, each with an action (allow, block, count, captcha, challenge) and a priority. The web ACL can be associated with a CloudFront distribution (global scope, region CLOUDFRONT), an Application Load Balancer, an API Gateway REST API, an AppSync GraphQL API, a Cognito user pool, an App Runner service, or a Verified Access instance (regional scope). The same web ACL cannot be attached to multiple scopes. The rule groups can be AWS managed (Core rule set, Known bad inputs, SQL database, Linux operating system, IP reputation, anonymous IP list, bot control, account takeover prevention, account creation fraud prevention), AWS Marketplace, or customer authored. Customer authored rules can be statement-based (geo match, IP set, regex match, size constraint, SQLi, XSS, byte match) or rate-based with optional aggregation key (IP, header, cookie, query string, custom key).
Network Firewall is a stateful inspection service that sits inside a VPC subnet and enforces traffic policies on the flows that traverse it. It uses the open-source Suricata rule format for stateful rules, supports stateless 5-tuple rules for pre-filtering, and can perform TLS inspection on egress when configured with a certificate authority. Network Firewall is the right service for east-west isolation, deep packet inspection on egress, allow-listing of FQDNs, and protocol enforcement (HTTP host headers, TLS SNI, JA3 fingerprints). It is not a Layer 7 web application firewall; SQL injection and XSS belong to WAF. The exam expects the candidate to keep these scopes distinct.
Route 53 Resolver DNS Firewall sits between workloads in a VPC and the Resolver endpoint that resolves outbound DNS queries. Rule groups contain domain lists, with actions ALLOW, BLOCK, ALERT, and BLOCK with response (NXDOMAIN, NODATA, or OVERRIDE to a redirect target). DNS Firewall is the canonical control for blocking known command-and-control domains, dynamic DNS abuse, newly registered domains, and DGA-style exfiltration patterns. AWS publishes managed domain lists (Malware Domain List, Botnet Command and Control Domain List, AWS-managed domain lists for Bedrock data sources). Pairing DNS Firewall with GuardDuty's DNS finding family closes the loop: GuardDuty alerts on the query, DNS Firewall denies the resolution.
Threat Model to Service Mapping
Implement Secure Communication Between AWS Resources
PrivateLink is the AWS implementation of consumer-to-producer service exposure over private IP addresses. A producer publishes a service through a Network Load Balancer (or Gateway Load Balancer for inline appliances) and registers it with the VPC endpoint service. A consumer creates an interface endpoint in its own VPC; AWS provisions elastic network interfaces with private IP addresses from the consumer subnet, and DNS resolution either resolves to the endpoint network interfaces (when private DNS is enabled) or returns the public DNS name with a regional alias. PrivateLink prevents the producer's network from learning the consumer's CIDR and prevents the consumer from needing internet egress to reach the service.
Two endpoint families coexist on AWS. Gateway endpoints exist for Amazon S3 and Amazon DynamoDB only; they install prefix-list-style entries in route tables and incur no per-endpoint hourly charge. Interface endpoints are PrivateLink and cover the long list of remaining services (KMS, Secrets Manager, Systems Manager, ECR, STS, CloudWatch Logs, and many more). The exam reliably tests the distinction. A workload that must talk to S3 from a private subnet without NAT should use the S3 gateway endpoint, not a Lambda function calling an interface endpoint behind a NAT gateway. The interface endpoint exists for cases that require resource policies that allow only specific principals to use a specific endpoint, or where the workload needs S3 access without taking on the route table entries the gateway endpoint installs.
# Create the S3 gateway endpoint and attach it to a private route table.
aws ec2 create-vpc-endpoint \
--vpc-id vpc-01234567 \
--service-name com.amazonaws.us-east-1.s3 \
--vpc-endpoint-type Gateway \
--route-table-ids rtb-private-a rtb-private-b \
--policy-document file://s3-endpoint-policy.json
# Create an interface endpoint for KMS with private DNS enabled.
aws ec2 create-vpc-endpoint \
--vpc-id vpc-01234567 \
--service-name com.amazonaws.us-east-1.kms \
--vpc-endpoint-type Interface \
--subnet-ids subnet-priv-a subnet-priv-b \
--security-group-ids sg-endpoint-kms \
--private-dns-enabled
Endpoint policies are the access-control layer for the endpoint itself. They restrict what the endpoint can be used for, not who the principal is. A common pattern is an S3 endpoint policy that allows actions only against bucket ARNs that belong to the organization, paired with an aws:PrincipalOrgID condition. The pattern stops data exfiltration to attacker-controlled buckets through the company's own VPC.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAccessToOrgBucketsOnly",
"Effect": "Allow",
"Principal": "*",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::*/*",
"Condition": {
"StringEquals": {"aws:ResourceOrgID": "o-abc12345xy"}
}
}
]
}
📊 Limit: A single VPC supports a maximum of 255 gateway endpoints across all gateway-enabled services, and an interface endpoint can have a maximum of 50 elastic network interfaces. Verify the current published quotas against the Service Quotas console before designing for scale.
Troubleshoot Network Connectivity and Security Issues
Network troubleshooting at the VPC layer follows a fixed flow: source security group, source subnet network ACL, source route table, target route table, target subnet network ACL, target security group. Each layer can drop traffic silently and each has a different log surface. Security groups are stateful (return traffic for an allowed connection is implicitly permitted) and allow-only (no deny rules). Network ACLs are stateless (return traffic must be explicitly allowed by the egress rule on one side and the ingress rule on the other) and support deny rules. The most common Layer 3 connectivity failure is a network ACL whose ephemeral port range (1024 to 65535 for Linux clients; 49152 to 65535 for Windows; 32768 to 60999 for AWS Lambda) is too narrow for return traffic.
Route table misconfiguration is the second large class. A VPC endpoint that exists in the wrong AZ, a route that targets a deleted NAT gateway, or a transit gateway route that is silently overridden by a more-specific local route all cause the same symptom (the call hangs or returns connection refused). VPC Reachability Analyzer is the deterministic tool for these cases: it analyzes the configuration of security groups, network ACLs, route tables, and endpoint policies and reports the explicit reason for the drop, not a packet capture interpretation. The check produces a path with each hop annotated; the answer is in the configuration, not the runtime.
💡 Exam Trap: When a question describes a workload that can reach S3 through the public endpoint but not through a newly created gateway endpoint, the answer is almost always the endpoint policy or the route table priority. A more-specific route (an explicit prefix list to an instance through a route) overrides the gateway endpoint route in the same table; auditing the route table against the prefix list catches it.
⚠️ Anti-Pattern: Adding broad 0.0.0.0/0 deny rules to a network ACL to "lock down" a subnet usually breaks DNS, NTP, and Resolver query traffic in ways that take hours to diagnose. The correct lock-down is a default-deny network ACL with explicit allow rules for the protocols the subnet must serve, applied during a maintenance window with VPC Flow Logs in REJECT mode tail-tracked through CloudWatch Logs Insights.
Decision Anchor: Choose Network Firewall when the requirement is stateful protocol inspection or FQDN allow-listing on VPC traffic; choose WAF when the requirement is Layer 7 HTTP semantics on a load balancer or distribution; choose security groups when the requirement is host-to-host allow-listing inside the VPC; choose network ACLs only as a coarse, stateless subnet boundary when explicit deny rules are needed.
