Understanding subnets in VPCs
In this section, we will learn about and understand AWS subnets, which are subparts of AWS VPCs. VPCs can be further divided into multiple subnets. These subnets can either be public or private, depending on the security needs of your architecture. We will look at the concept of subnets from the point of view of AWS Lambda functions.
We will perform the following steps:
- You can go to the
Subnets
menu via the VPC page itself. You need to click on theSubne
option under thet
sYour VPCs
option on the left:

- This will take you to the subnets console, where you will see some already existing subnets. These are the default subnets for each availability zone in your region:

- Now, to create a new subnet, you need to click on the blue
Create Subnet
button on the top-left side of the console. In the creation wizard, you will be asked to enter the following details—the name of the subnet, the VPC you want to place it in, availability zones, and also preferred IPv4 CIDR blocks...