CLOUD CONCEPT

Defense in Depth

Defense in Depth is a security strategy that uses multiple complementary layers of protection so that failure of one control does not expose the entire system.

Cloud Concepts Hub →

What is Defense in Depth

Defense in Depth combines preventive, detective, and response controls across network boundaries, identities, applications, hosts, and data. It reduces dependence on any single safeguard and limits the impact of successful attacks, configuration mistakes, and compromised credentials.

Defense in Depth assumes that individual security controls can fail, be bypassed, or be misconfigured. Instead of relying on a perimeter firewall alone, an architecture combines controls that address different attack paths and failure modes. For example, an internet-facing application might use distributed denial-of-service protection, HTTP request filtering, restricted origin access, workload-level network rules, application authorization, and database permissions. If an attacker bypasses request filtering, authorization and data-access controls still constrain what the attacker can do.

Cloud network segmentation applies this principle by separating resources according to trust, sensitivity, and required communication. North/south traffic crosses a defined environment boundary, such as traffic between the internet and an application. East/west traffic moves between internal workloads, such as an application server connecting to a database. These directions are relative to the architectural boundary being discussed. Protecting only internet ingress leaves lateral movement paths available after a workload is compromised.

A practical three-tier design places public entry points in internet-facing subnets, application workloads in private subnets, and databases in isolated subnets. Only the entry point can reach the application port, and only the application tier can reach the database port. An isolated subnet has no route to an internet gateway or NAT gateway, but it is not automatically disconnected from other internal networks. Local routes, transit connections, endpoints, and resource-level rules still determine possible communication. A subnet boundary by itself does not enforce isolation.

On AWS, security groups provide stateful, resource-level filtering, while network ACLs provide stateless subnet-boundary filtering. Network ACL rules must account for return traffic, including applicable ephemeral ports. Security groups can restrict permitted connections between application tiers; subnet ACLs can provide broader boundary restrictions. Neither replaces application authorization. Where centralized network inspection is required, routing must actually steer the relevant traffic through the firewall. Stateful inspection also requires a supported symmetric traffic path, including during failover.

Edge controls should match anticipated threats. Volumetric attacks call for distributed infrastructure and DDoS defenses; malicious HTTP requests call for application-layer filtering; abusive request rates may require rate limits or bot controls. A web application firewall does not inspect arbitrary non-HTTP protocols and cannot replace secure application code. A CDN does not prevent attackers from contacting a publicly reachable origin unless origin access is restricted separately. Use private origin connectivity where supported, or combine network restrictions and origin request validation to prevent direct-origin bypass.

Defense also extends to outbound connections, administrative access, and data access. Restrict unnecessary egress to reduce command-and-control and exfiltration paths, use narrowly scoped workload identities, and authenticate administrative sessions independently of network location. Encryption protects confidentiality but does not stop an authorized, compromised workload from reading data it is permitted to access. Network flow records, firewall logs, application logs, and identity audit events provide complementary evidence for detection and investigation.

Additional layers introduce cost, latency, operational complexity, and potential availability failures. Select controls for explicit threats rather than duplicating the same rule everywhere without a purpose. During troubleshooting, trace DNS resolution, routing, inspection paths, network rules, and application decisions in sequence; a timeout alone does not identify the blocking layer. Test expected connections, prohibited connections, origin-bypass attempts, and failure scenarios. The goal is independent protection with manageable operations, not the largest possible number of security products.

Key aspects of Defense in Depth

Effective Defense in Depth combines complementary controls, segmented trust boundaries, threat-specific edge protection, least privilege, and tested detection and response.

Complementary protection layers

Combine controls with different functions and failure modes, such as edge filtering, workload network restrictions, identity authorization, and data permissions. Repeating one permissive policy across several products does not provide meaningful independence.

Segmentation and containment

Separate workloads by trust level and permit only required communication between them. Protect both north/south entry paths and east/west connections so a compromised workload cannot freely reach adjacent systems.

Threat-aligned edge defenses

Choose controls according to the expected attack: DDoS protection for traffic floods, HTTP filtering for malicious web requests, and origin restrictions for bypass prevention. Account for the protocols and endpoints each control actually protects.

Explicit trust and least privilege

Treat network reachability as only one prerequisite for access, not proof of authorization. Require appropriate identities and narrowly scoped permissions even for requests originating inside private networks.

Detection and response coverage

Collect network, application, and identity telemetry to detect attacks that preventive controls miss. Connect alerts to response procedures that can isolate workloads or revoke access without unnecessarily disrupting unrelated systems.

Validated paths and failure behavior

Verify that traffic traverses the intended controls and cannot take an unprotected alternate route. Test return paths, failover routing, and control outages to identify both security gaps and availability risks.

Cloud services for Defense in Depth

Amazon VPC establishes network boundaries and permitted paths, while AWS Network Firewall inspects selected traffic routed through those paths. For internet-facing web applications, Amazon CloudFront, AWS Shield, and AWS WAF provide complementary delivery, DDoS, and HTTP-filtering layers. Origin restrictions ensure those edge layers cannot be bypassed. IAM independently limits the AWS operations available to users and workloads, including workloads with valid network access. Together, these services address different attack stages rather than providing interchangeable protection. Their effectiveness depends on explicit routing, scoped permissions, coordinated logging, and tests that verify both allowed access and blocked attack paths.

Virtual private cloud VPC_32 image Amazon VPC

Amazon VPC provides subnets, route tables, security groups, and network ACLs for layered network segmentation. Engineers must combine routing and filtering deliberately because private or isolated subnet placement alone does not prevent lateral access.

Open Amazon VPC →
AWS WAF image AWS WAF

AWS WAF filters HTTP and HTTPS requests on supported resources using rules such as request matching and rate-based controls. It complements network controls and DDoS defenses but does not replace application authorization or protect arbitrary transport protocols.

Open AWS WAF →
AWS Shield image AWS Shield

AWS Shield provides DDoS protection, with Standard automatically included and Advanced offering additional capabilities for eligible protected resources. It addresses availability attacks as one layer rather than replacing web request filtering, segmentation, or origin protection.

Open AWS Shield →
AWS Firewall Manager image AWS Network Firewall

AWS Network Firewall provides managed network traffic filtering and inspection for traffic routed through its firewall endpoints. It can enforce ingress, egress, or east/west policies, but coverage depends on routing design and supported symmetric traffic flows.

Open AWS Network Firewall →
Amazon CloudFront image Amazon CloudFront

Amazon CloudFront places a distributed delivery layer in front of applications and integrates with AWS WAF and AWS Shield. Restrict origin access separately so attackers cannot bypass edge controls by addressing the origin directly.

Open Amazon CloudFront →