I have two VPC's in VPC1 in public subnet there is NAT GAteway for private subnet to go to internet... in VPC2 private subnet I have EC2 instance that needs to go to internet but i don't want to put NAT gateway or NAT instance in the public subnet of VPC2 if there is a way to sent traffic through peering and use NAT gateway in VPC1?
0
votes
1 Answers
1
votes
Unfortunately there is not supported as VPC peering is not transitive as explained here:
If either VPC in a peering relationship has one of the following connections, you cannot extend the peering relationship to that connection:
- An internet connection in a private subnet through a NAT device
Also:
Similarly, if VPC A has a NAT device that provides internet access to instances in private subnets in VPC A, instances in VPC B cannot use the NAT device to access the internet.