Amazon VPC gives each workload a private network inside AWS, and AWS Direct Connect links that network to an on-premises site over a dedicated connection instead of the internet.

Amazon VPC

Amazon Virtual Private Cloud (VPC) lets you launch AWS resources in a logically isolated virtual network you define. Each Region has a default VPC; the VPC itself is free, but some components such as NAT gateways cost money.1

Building blocks

PieceRole
VPCA network with an IPv4 and/or IPv6 CIDR range
SubnetAn address range inside one Availability Zone
Route tableDecides where traffic from a subnet or gateway goes
Internet gatewayPublic internet access
NAT gatewayOutbound-only internet for private subnets
VPC endpointPrivate access to AWS services
Peering, Transit GatewayVPC to VPC; Transit Gateway is a central hub
VPN, Direct ConnectVPC to on-premises
Security group, network ACLStateful instance-level and stateless subnet-level firewalls

As listed in the note. VPC Flow Logs capture IP traffic metadata.1

Practices

  • Plan CIDR blocks so they never overlap across VPCs and on-premises networks.
  • Use several Availability Zones and put databases and internal services in private subnets.
  • Prefer VPC endpoints (gateway endpoints for S3 and DynamoDB, interface endpoints for others) over NAT for private service access.
  • Enable Flow Logs; default-deny security groups; Transit Gateway when connecting many VPCs.1

Troubleshooting

SymptomCheck
Public instance has no internetDefault route to the IGW, SG egress, NACL, public IPv4
Private instance has no internetNAT gateway in a public subnet with an Elastic IP, and a route to it
Cannot reach RDS in a private subnetRDS security group source and subnet routing
AWS service access blockedAdd a VPC endpoint; check its security group and policy
DNS not resolvingenableDnsSupport, enableDnsHostnames, Resolver rules

As tabled in the note. Default quotas are 5 VPCs per Region (adjustable) and 200 subnets per VPC.1

AWS Direct Connect

Direct Connect is a dedicated private connection between an on-premises network and AWS. It bypasses the public internet, gives more consistent network performance, and can cut transfer costs for large volumes.2

Connections and virtual interfaces

PieceDetail
Dedicated connectionA physical port of 1, 2, 5, or 10 Gbps; a LAG bundles up to four
Hosted connectionFrom a Delivery Partner, 50 Mbps to 10 Gbps
Private VIFOne VPC in the same account and Region
Public VIFPublic AWS services such as S3 and DynamoDB
Transit VIFA Direct Connect gateway reaching many VPCs, accounts, and Regions
MACsecOptional layer-1 encryption on dedicated connections

As described in the note. Virtual interfaces use 802.1Q VLAN tags and BGP peering, with optional MD5 authentication and BFD.2

Practices

  • Redundant connections in at least two Direct Connect locations, with BGP set for automatic failover; VPN as a backup path where justified.
  • A transit VIF with a Direct Connect gateway for multi-VPC setups.2

Troubleshooting

SymptomCheck
Connection downCross-connect complete, device connected at the facility
BGP not establishingVLAN, peer IPs, ASN, MD5 password, correct VIF
VIF pending or confirmingAccept or confirm the VIF
Traffic not routingGateway association, route propagation, advertised prefixes
Latency highTraffic may be falling back to VPN or internet

As tabled in the note.2

Footnotes

  1. Amazon VPC - Runbook & Reference, original ↩ ↩2 ↩3 ↩4

  2. AWS Direct Connect - Runbook & Reference, original ↩ ↩2 ↩3 ↩4