What is VPC? What is the role of VPC?


What is VPC?


Its Characteristics

  • A service that creates logical networks for multiple AZs within a region.
  • A virtual network service that connects AWS services (EC2,, ELB, ALB, etc.).
  • A virtual network that brings together EC2 and other devices in each AZ.
  • The virtual network is used by assigning IPs in CIDR notation.


Role of VPC

The AZs are separated by a logical network of IP ranges assigned by CIDR called VPC.

When AZs are grouped together in a single VPC, a single network can be used between AZs.

rough sketch



When and why use it?



What is Multi-VPC?

A pattern in which a single account uses multiple VPCs is called multi-VPC.

There is also a pattern of multi-accounting (creating child accounts) with each account having its own VPC.

Used to separate each application.


About VPC Restrictions

Up to 5 VPCs per account, per region.


CIDR block rules for VPC

The following rules apply when adding CIDR blocks to a VPC

  1. Allowable block sizes range from "/ 28" subnet mask to "/ 16" subnet mask
  2. CIDR blocks must not overlap with existing CIDR blocks associated with the VPC



The "DNS hostnames option" for VPC

If the DNS hostnames option is not enabled for a VPC
Instances launched on the subnet will not get DNS names
DNS names are not available for instances launched on subnets without the hostnames option enabled.

To enable the DNS hostnames option for a VPC, set the enableDnsSupport attribute to "true" and then set the enableDnsHostnames attribute to "true" to enable instances in the VPC to obtain DNS hostnames.