Architecture Design and Implementation Built for the Cloud · Topic 6 of 11

VPC Design, IPv6 and Network Security

Plan subnets and addresses with VPC IPAM, adopt IPv6 with dual stack, and inspect and filter traffic with Network Firewall, GWLB, WAF, SGs and NACLs.

  • 5 min
In a nutshell
  • IPAM gives organization-wide pools, allocation rules and overlap monitoring.
  • Security groups are stateful and allow only; network ACLs are stateless with numbered allow and deny rules.
  • Network Firewall is managed inspection; Gateway Load Balancer is for third-party appliances.

What it is

A VPC design decides how address space is allocated, which subnets face the internet, and how workloads are kept apart. At scale this is an organization-wide plan, not a per-VPC decision.

Network security adds layers on top: filtering at the instance and subnet, deep inspection between networks, and protection of web applications. IPv6 adoption reshapes both, because IPv6 addresses are globally unique and need no NAT.

IPAMorganization poolsallocates CIDRsVPCsper accountsegmented bySubnets and route tablesprotected byFirewallsSG, NACL, Network Firewall, WAF

How it works

Subnets, addressing and segmentation

  • Public subnets route to an internet gateway and hold load balancers and NAT gateways. Private subnets hold application and data tiers and reach the internet through a NAT gateway.
  • Place one NAT gateway in each AZ so the loss of one AZ does not cut outbound access for the others.
  • Size subnets for growth: EKS pods and Lambda in a VPC consume IP addresses quickly.

Amazon VPC IP Address Manager (IPAM) plans, tracks and monitors IP addresses across accounts and Regions. You build a hierarchy of pools (for example by Region and environment), integrate with AWS Organizations, and let accounts allocate non-overlapping CIDRs from the pools.

IPAM allocation rules control the size and tagging of allocations, and its monitoring flags overlapping or unmanaged CIDRs. Planning without overlaps keeps future peering, Transit Gateway and hybrid routing possible.

Segmentation separates environments or trust levels. Use separate VPCs and accounts for hard boundaries, Transit Gateway route tables to control which VPCs can reach each other, and subnets with route tables inside a VPC.

Filtering: security groups and network ACLs

ControlLevelStateRules
Security groupNetwork interfaceStateful, return traffic allowedAllow only; can reference other security groups
Network ACLSubnetStateless, return traffic needs its own ruleAllow and deny, evaluated in number order

Use security groups for most access control and reference groups instead of IP ranges. Use a network ACL deny rule to block a specific CIDR quickly at the subnet edge.

Inspection and application protection

NeedService
Managed stateful inspection, domain filtering, Suricata-compatible IPS rulesAWS Network Firewall
Fleet of third-party virtual appliances, scaled and kept highly availableGateway Load Balancer with GWLB endpoints
Layer 7 protection: SQL injection, XSS, rate limits, bot controlAWS WAF on CloudFront, ALB, API Gateway or AppSync
Central rule management across accountsAWS Firewall Manager
Record of accepted and rejected flowsVPC Flow Logs

A common multi-account pattern sends traffic between VPCs and to the internet through a central inspection VPC attached to Transit Gateway. Turn on appliance mode on that attachment so both directions of a flow use the same AZ and the same stateful firewall.

Spoke VPCattachmentTransit Gatewayinspection route tableInspection VPCNetwork Firewallback toTransit GatewayroutesEgress VPCNAT gateway

Flow Logs capture metadata such as addresses, ports, action and bytes, not packet payloads. Use Traffic Mirroring when payload inspection is required.

IPv6 and dual stack

  • A dual-stack VPC adds an IPv6 CIDR alongside IPv4, so resources can use both during migration. Add IPv6 to subnets, route tables, security groups and load balancers.
  • Every IPv6 address is globally routable. An egress-only internet gateway lets instances start outbound IPv6 connections while blocking inbound ones, which is the IPv6 equivalent of a NAT gateway's role.
  • IPv6-only subnets save IPv4 space. To reach IPv4-only services, use DNS64 on the subnet with NAT64 on a NAT gateway.
  • Migrate from the outside in: dual-stack the load balancers and edge first, then the application tiers, then retire IPv4 where possible.
IPv6 only workloadDNS64 answerNAT gatewayNAT64translatesIPv4 service

How the exam asks about this

  • "Two hundred accounts keep creating overlapping CIDRs that block Transit Gateway routing" -> Amazon VPC IPAM pools shared across the organization with allocation rules.
  • "All traffic between VPCs must pass a stateful firewall, and some flows break asymmetrically" -> central inspection VPC with Network Firewall and appliance mode on the Transit Gateway attachment.
  • "The company is running out of private IPv4 space for EKS pods" -> adopt IPv6, such as an IPv6 EKS cluster in dual-stack subnets, with an egress-only internet gateway for outbound traffic.

What to remember for the exam

  • IPAM gives organization-wide pools, allocation rules and overlap monitoring.
  • Security groups are stateful and allow only; network ACLs are stateless with numbered allow and deny rules.
  • Network Firewall is managed inspection; Gateway Load Balancer is for third-party appliances.
  • AWS WAF protects layer 7 on CloudFront, ALB, API Gateway and AppSync; Firewall Manager applies it across accounts.
  • Appliance mode keeps flows symmetric through a stateful inspection VPC.
  • Egress-only internet gateway for outbound IPv6; DNS64 with NAT64 for IPv6-only to IPv4.
Watch out

When a subnet's IPv6 route points to an internet gateway, its IPv6 resources can be reached from the internet. Security groups and an egress-only internet gateway, not NAT, are what keep IPv6 resources private.

Common mistakes

Blocking an attacker with a security group. Security groups have no deny rules. Use a network ACL deny, or AWS WAF for web traffic.

Expecting Flow Logs to show packet contents. Flow Logs record metadata only. Traffic Mirroring or an inspection appliance is needed for payloads.

Planning CIDRs per team in a spreadsheet. Manual plans drift and overlap. IPAM pools and allocation rules enforce the plan at creation time.

Check yourself

  • Why turn on appliance mode for a Transit Gateway inspection VPC attachment?

    It keeps both directions of a flow in the same AZ, so the stateful firewall sees the whole connection and does not drop return traffic.

  • What lets IPv6 instances reach the internet without accepting inbound connections?

    An egress-only internet gateway, which allows outbound IPv6 traffic and its responses only.

  • Which service manages third-party firewall appliances with scaling and high availability?

    Gateway Load Balancer, with GWLB endpoints steering traffic to the appliance fleet.

Topic 6 of 11 in Architecture Design and Implementation Built for the Cloud

Test yourself on Architecture Design and Implementation Built for the Cloud

The full AWS SAP-C03 question bank has 850 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.