Supplement · AWS
VPC, connectivity và DNS
VPC là software-defined network boundary. Route table quyết định next hop; Security Group (SG) stateful, Network ACL stateless; DNS và endpoint policy là phần của security path.
Traffic path
- Public subnet nghĩa route đến Internet Gateway, không tự làm instance public. Outbound private subnet thường qua NAT Gateway theo AZ để tránh cross-AZ dependency/cost.
- SG gắn ENI và chỉ allow; NACL áp theo subnet, có allow/deny và cần ephemeral ports hai chiều.
- Transit Gateway phù hợp hub-and-spoke lớn; VPC peering không transitive. PrivateLink công bố service riêng mà không hợp nhất route domain.
- Site-to-Site VPN nhanh triển khai; Direct Connect ổn định hơn nhưng cần redundancy và thường giữ VPN backup.
DNS
Route 53 public/private hosted zone, Resolver inbound/outbound endpoint và forwarding rule tạo hybrid DNS. Split-horizon cần test từ đúng resolver context. VPC endpoint gateway/interface giảm internet path; endpoint policy, route/SG và service policy cùng quyết định access.
Debug: source/destination → DNS answer → route hai chiều → SG → NACL → NAT/TGW/endpoint → flow logs; đừng bắt đầu bằng thay ngẫu nhiên firewall.