VPC components
AWS VPC is a logically separated network isolated from other networks. It lets you set your own IP address range and configure security settings and routing for all your traffic. AWS VPC is made up of several networking components, as shown in the following figure; some of them are as follows:
- Subnets
- Elastic network interfaces
- Route tables
- Internet gateways
- Elastic IP addresses
- VPC endpoints
- NAT
- VPC peering

Figure 1 - AWS VPC components
Let's take a closer look at these components:
Subnets
A VPC spans an AWS region. A region contains two or more availability zones. A VPC contains subnets that are used to logically separate resources inside a region. A subnet cannot span across multiple availability zones. A subnet can either be a private subnet or a public subnet based on its accessibility from outside of VPC and if it can access resources outside of VPC.
Subnets are used for separating resources, such as web servers and database servers. They are also used for making your application...