Subnets and route tables
The core foundation of VPC in AWS is built on top of three pivotal elements: subnets, CIDR blocks, and route tables. It is crucial to understand these components thoroughly to optimize your network architecture and ensure it aligns with your business needs.
Understanding subnets
A subnet is basically a logical subdivision of an IP network. In the context of AWS, a subnet resides in the single availability zone of your VPC. In other words, imagine a subnet as a unique compartment within your VPC where you can place your resources, such as EC2 instances, and isolate them between different compartments for security and administrative reasons.
A subnet can either be public or private and this is determined by whether they have a direct route to the internet. A public subnet has a route to an internet gateway, allowing instances within the subnet to reach the internet. In contrast, a private subnet does not carry a route to the internet and thereby restricts...