## VPC Design and Architecture
Effective VPC design is crucial for scalable, secure, and highly available cloud networks. It involves careful planning of IP addressing, connectivity, and security controls.
IP Addressing and Subnetting
- Each VPC is defined by a CIDR block (e.g., 10.0.0.0/16). For multi-VPC or hybrid environments, ensure non-overlapping CIDRs to enable connectivity via VPC Peering or Transit Gateway.
- Subnets divide a VPC's CIDR block. They are tied to a single Availability Zone (AZ) and categorized as public (with route to Internet Gateway), private (no direct internet route), or isolated.
- NAT Gateway provides outbound internet access for instances in private subnets. Egress-only Internet Gateway serves the same purpose for IPv6 traffic.
Multi-VPC Connectivity
- VPC Peering connects two VPCs directly, allowing instances to communicate as if they are in the same network. It is non-transitive, meaning a peered VPC cannot route traffic to other VPCs peered with its peer.
- AWS Transit Gateway (TGW) acts as a central hub for connecting multiple VPCs and on-premises networks. It enables transitive routing, simplifying complex network topologies and allowing any attached VPC or VPN to communicate with any other. TGW supports routing domains and multicast.
Hybrid Connectivity
- AWS Direct Connect (DX) provides a dedicated, private network connection from your premises to AWS, bypassing the public internet. It offers consistent network performance and reduced bandwidth costs.
- AWS Site-to-Site VPN creates an encrypted connection over the public internet between your on-premises network and your VPC or Transit Gateway. Often used as a backup for DX or for less critical connections.
Network Security
- Security Groups (SGs) act as stateful firewalls at the instance level, controlling inbound and outbound traffic. They allow rules based on IP addresses or other SGs.
- Network Access Control Lists (NACLs) are stateless firewalls at the subnet level. They evaluate both inbound and outbound traffic separately and process rules in order (lowest number first).
Routing and DNS
- Route Tables define rules for traffic leaving subnets. They include local routes, explicit routes, and propagated routes (from TGW or DX Gateway).
- VPC Endpoints allow private access to AWS services without traversing the internet.
- Gateway Endpoints for Amazon S3 and DynamoDB, using prefix lists in route tables.
- Interface Endpoints (powered by AWS PrivateLink) for a wide range of AWS services and custom services, using Elastic Network Interfaces (ENIs) in your subnets.
- Route 53 Resolver Endpoints enable hybrid DNS resolution, allowing on-premises resources to resolve AWS private hosted zones and vice-versa.
What is the primary limitation of VPC Peering?
VPC Peering is non-transitive, preventing routing through a peered VPC to other networks.
tap to reveal
Which AWS service enables transitive routing between multiple VPCs and on-premises networks?
AWS Transit Gateway (TGW).
tap to reveal
Differentiate between Security Groups and Network ACLs (NACLs).
Security Groups are stateful, instance-level firewalls; NACLs are stateless, subnet-level firewalls.
tap to reveal
Which type of VPC Endpoint uses Elastic Network Interfaces (ENIs) for private service access?
Interface Endpoints (powered by AWS PrivateLink).
tap to reveal
Which two AWS services are accessible via a Gateway Endpoint?
Amazon S3 and Amazon DynamoDB.
tap to reveal
How do you enable outbound internet access for IPv6 instances in a private subnet?
By using an Egress-only Internet Gateway.
tap to reveal
What AWS service facilitates hybrid DNS resolution between on-premises and AWS private hosted zones?
Route 53 Resolver Endpoints (inbound and outbound).
tap to reveal
What is a critical IP addressing requirement for connecting VPCs via Peering or Transit Gateway?
All connected VPCs must have non-overlapping CIDR blocks.
tap to reveal