I am currently getting my hands dirty with AWS VPC and have stumbled upon a scenario in peering.
I had created two VPCs - VPC1, VPC2. VPC1 has a public subnet and an EC2 Linux instance. VPC2 has a private subnet and an EC2 Linux instance.
I have established peering between the two VPCs and was able to access the EC2 instance on VPC1 from my local machine and then connect to EC2 instance on VPC2 from it.
I had a rule on security group of the EC2 instance on the private subnet to allow ALL SSH connectivity to it. ( without this I wasn't able to connect between the instances )
Now instead of having the second instance on a private subnet, I modified the subnet to be a public one and am able to connect to the EC2 instance on it from an EC2 instance on non-peer VPC as well.
My question :
- How is that am able to connect to public subnets between non-peered connections? Can I decipher that public subnets in the same region don't require peer connections setup in order to connect?