What Is Vpc And Subnets
Let s zoom in on one of the vpcs from the diagram above.
What is vpc and subnets. We ll actually be talking about subnetting and vpc subnets in detail. This is great because you can then assign different behaviours to each of those subnets. Subnetting is the process of splitting a cidr block into smaller cidr blocks within the same range by using different subnet masks.
It is logically isolated from other virtual networks in the aws cloud. Let me start by quickly talking about what is meant by subnetting. Now subnets reside inside your vpc and they allow you to segment your vpc infrastructure into multiple different networks.
You can launch your aws resources such as amazon ec2 instances into your vpc. When you delete a vpc using the command line you must first terminate all instances and delete or detach all associated resources including subnets custom security groups custom network acls custom route tables vpc peering connections endpoints the nat gateway the internet gateway and the egress only internet gateway. Now you might want to do this to create better management for your resources or to isolate certain resources from others or even to create high availability and resiliency within your infrastructure.
Vpc networks including their associated routes and firewall rules are global resources. This virtual network closely resembles a traditional network that you d operate in your data center but enables you to leverage the scalable infrastructure in aws. Where a vpc specifies an ip address range a subnet allows you to group those ips into smaller sub networks or subnets.
They are not associated with any particular region or zone. Subnets are a way to slice up your vpc pie. So now we know what a vpc is let s take a look at subnets.
Amazon vpc and subnets amazon vpc enables you to connect your on premises resources to aws infrastructure through a virtual private network. Private subnet is a subnet which doesn t have a route to the internet gateway. Subnets are regional resources.