Cloud Networking Guide

VPC Design Principles

# CIDR planning โ€” avoid overlap with on-prem / other VPCs VPC CIDR: 10.0.0.0/16 (65,536 IPs total) # Subnet layout per AZ (for 3-AZ region) Public subnets (internet-facing LB, NAT gateways): 10.0.1.0/24 us-east-1a (251 usable IPs) 10.0.2.0/24 us-east-1b 10.0.3.0/24 us-east-1c Private subnets (app servers, EKS nodes): 10.0.11.0/24 us-east-1a 10.0.12.0/24 us-east-1b 10.0.13.0/24 us-east-1c Database subnets (no internet route): 10.0.21.0/24 us-east-1a 10.0.22.0/24 us-east-1b 10.0.23.0/24 us-east-1c # Rules: # โ€ข Public subnet: route 0.0.0.0/0 โ†’ Internet Gateway # โ€ข Private subnet: route 0.0.0.0/0 โ†’ NAT Gateway (per AZ) # โ€ข DB subnet: no route to internet; only from private subnet SG # โ€ข Reserve /18 or larger for EKS (many IPs per node)

Security Groups vs NACLs

FeatureSecurity GroupsNetwork ACLs
LevelInstance (ENI)Subnet
StateStateful (return traffic auto-allowed)Stateless (must allow both directions)
RulesAllow only (no deny)Allow and Deny
EvaluationAll rules evaluatedRules processed in order (number)
Use forPrimary access control (recommended)Subnet-level blocklist, extra defense layer

Connectivity Options

OptionUse CaseLatencyCost
VPC PeeringConnect 2 VPCs (same or cross-account)LowData transfer only
AWS Transit GatewayHub-and-spoke for many VPCsLowPer attachment + data
AWS Direct ConnectDedicated line from on-prem to AWSVery low (predictable)High (port + data)
Site-to-Site VPNEncrypted tunnel over internetMediumLow
Client VPNRemote developer/employee accessMediumPer connection-hour
VPC EndpointsPrivate access to AWS services (S3, DynamoDB)LowGateway: free; Interface: per hour
PrivateLinkExpose service privately to other VPCs/accountsLowPer endpoint + data