VPC networking
One of the most critical areas within a VPC is networking. The network settings control which systems can talk to others, whether a server can connect to the internet or not, and greatly enhance the security of your systems by limiting access to only the parts that a user requires. The first area of a VPC network we will learn about is subnets.
Subnets
Subnets are used to logically divide your VPC network into smaller chunks that you can then control separately. When you first create a VPC, you are required to give it a network IP range (called classless inter-domain routing (CIDR)), such as 192.168.0.1/16
(this would give you 65,634 IP addresses). You can then create subnets to split this very large IP range into different segments. Subnets are typically split into private and public subnets. A private subnet will not allow traffic from the internet to reach it so is a useful place to put things such as a database that will only talk to the application and not...