Example VPC configurations - Amazon Virtual Private Cloud

Example VPC configurations

You can use the following examples to create and configure your VPCs.

Example Usage
Create an IPv4 VPC and subnets using the AWS CLI Use the AWS CLI to create a VPC with a public subnet and a private subnet.
Create an IPv6 VPC and subnets using the AWS CLI Use the AWS CLI to create a VPC with an associated IPv6 CIDR block and a public subnet and a private subnet, each with an associated IPv6 CIDR block.
Create an IPv6 VPC and IPv6-only subnets using the AWS CLI Use the AWS CLI to create a VPC with an associated IPv6 CIDR block, create public and private IPv6-only subnets, and launch an IPv6-only EC2 instance into each subnet.
Share public subnets and private subnets Share private and public subnets with accounts.
Services using AWS PrivateLink and VPC peering Use a combination of VPC peering and AWS PrivateLink to extend access to private services to consumers.
Middlebox routing Configure fine-grain control over the routing path of traffic entering or leaving your VPC.

You can also use a transit gateway to connect your VPCs.

Example Usage
Centralized router Configure your transit gateway as a centralized router that connects all of your VPCs, AWS Direct Connect, and AWS Site-to-Site VPN connections. For more information, see Example: Centralized router in Amazon VPC Transit Gateways.
Isolated VPCs Configure your transit gateway as multiple isolated routers. This is similar to using multiple transit gateways, but provides more flexibility in cases where the routes and attachments might change. For more information, see Example: Isolated VPCs in Amazon VPC Transit Gateways.
Isolated VPCs with shared services Configure your transit gateway as multiple isolated routers that use a shared service. This is similar to using multiple transit gateways, but provides more flexibility in cases where the routes and attachments might change. For more information, see Example: Isolated VPCs with shared services in Amazon VPC Transit Gateways.