What is VPC?
A Virtual Private Cloud (VPC) is a logically isolated section of the AWS cloud where you can launch AWS resources in a virtual network. It offers resource isolation and configuration flexibility, allowing you to design and manage your cloud infrastructure.
Key Features of VPC:
IP Address Range: You can define the IP range using CIDR blocks.
The range must be between /16 and /28.
You can add up to 5 CIDR blocks to a VPC.
Regional Limits: By default, you can create 5 VPCs per region.
Subnets
Subnets divide your VPC into smaller networks, each within a specific availability zone (AZ).
Types of Subnets:
Public Subnet
- Connected to the internet using an Internet Gateway.
Private Subnet
For resources that don’t require direct internet access.
Needs a NAT Gateway for outbound internet traffic (e.g., updates, downloads).
Subnet Limits:
- Default limit: 200 subnets per VPC.
Internet Gateway (IGW)
An Internet Gateway connects your VPC to the internet, enabling communication between resources in your VPC and external systems.
Configuration:
Must be attached to the VPC.
Route traffic through a route table.
Resources in public subnets need a public IP to communicate with the internet.
NAT Gateway
A NAT Gateway allows instances in a private subnet to access the internet for updates and downloads without exposing them to inbound internet traffic.
Key Points:
Placement: Must be in a public subnet with an Elastic IP.
Inbound Traffic: No inbound traffic is allowed.
Capacity: Supports 55,000 connections simultaneously.
Bandwidth: Offers 45 Gbps per instance type.
Route Table
A Route Table controls how traffic is directed within your VPC.
Types of Route Tables:
Main Route Table: Default table for all subnets.
Custom Route Table: Specific to particular subnets or traffic.
Route Table Limits:
Default limit: 200 route tables per VPC.
Each table can support up to 50 routes.