amazon-web-servicesamazon-vpcaws-vpc-peeringvpc-peering

How do two private subnets in the same AWS VPC contact each other although they are in different AZ?


How is communication facilitated between two private subnets made in the same AWS VPC, when they are located in different availability zones?

Are they connected internally in some way? If not, how does one instance in private subnet 1 will connect to an instance in private subnet 2 if both don't have access to internet (they are in private subnets)?


Solution

  • All resources within the same VPC can communicate with each other. It does not matter that the resources are in different Subnets or different Availability Zones. They are connected internally via the VPC.

    Just make sure that the Security Group associated with each resource permits the communication. (Note the Security Groups operate on each resource individually, so merely "putting them in the same security group" won't guarantee the connection unless the security group is configured to allow connections with itself.)