Access to AWS CLI and the AWS Management Console with an active account are both required for this chapter. A basic understanding of network terms will also help as you work through this chapter.
If you need help understanding networking fundamentals and basic terms such as CIDR, route, and access control list, refresh your knowledge of these topics before going through this chapter and attempting the AWS Certified Security – Specialty exam. If you need a resource on CIDRs, the following link should help you understand the topic better: https://packt.link/9JMFl.
You can think of a VPC as your own private section of the AWS network. It allows you to create a virtual network infrastructure that you can segment into different networks. VPCs can be segmented for public-facing access, in which services have IP addresses that are reachable by the entire internet, and private access, in which the IP addresses are accessible only once you have entered the VPC network and a route has been provided.
Before you start reviewing the different aspects of VPC security, first look at some of the terms that will be used throughout this chapter in discussions on AWS networking:
Figure 10.1: VPC with private and public subnets with CIDR notation (which is actually a range of IP addresses)
The VPC shown in Figure 10.1 depicts one built with a full CIDR range of /16 that allows for a total of 65,536 IP addresses. The VPC has been spread out across three AZs in the Region, with one public and two private subnets placed in each AZ.
There are five IP addresses reserved for AWS’s use to create a subnet CIDR block (the following example uses the 192.0.0.0/24 CIDR range):
Think of these reserved IP addresses as specific roles or addresses that are automatically set up for your VPC to function correctly within the AWS environment. They help manage and direct traffic, keep track of devices, and ensure that data is routed to the right destinations efficiently.
So, if you have a VPC with a CIDR range of 192.0.0.0/24, there are 251 IP addresses available for your resources within that VPC. The five reserved addresses are separate from this pool and do not reduce the number of usable addresses. You can use any of the remaining 251 addresses for your instances, databases, and other services as needed.
Those five reserved IP addresses in an AWS VPC are essential for the VPC’s internal functioning but do not impact the total number of usable IP addresses for your resources in the VPC. The size of your VPC’s IP range, as defined by the CIDR notation, determines the total number of addresses available to use.
With an understanding of the basic terms you will be using in this chapter and how VPCs are constructed, you are now ready to try creating a basic VPC in your AWS account, which you will do in the following exercise.