You can have 200 subnets per VPC.
In AWS, the number of subnets you can have per VPC depends on the CIDR block size of the VPC and the size of the subnets. You can create subnets within a VPC by dividing the VPC CIDR block into smaller CIDR blocks. Each subnet must be associated with a unique CIDR block that is a subset of the VPC CIDR block.
The formula to calculate the number of available subnets within a VPC is:
Number of Available Subnets = 2^(32 – subnet mask)
Where the subnet mask is determined by the size of the CIDR block allocated to each subnet.
For example:
- If your VPC has a CIDR block of 10.0.0.0/16 (which means 65,536 IP addresses).
- And if you create subnets using a /24 CIDR block size (256 IP addresses per subnet).
Then, you would have:
Number of Available Subnets = 2^(32 – 24) = 2^8 = 256 subnets
So, in this scenario, you could have up to 256 subnets within the VPC.
In summary, the correct answer would be: The number of subnets you can have per VPC depends on the size of the VPC’s CIDR block and the size of the subnets you create within it.