A SysOps administrator is troubleshooting connectivity between two VPCs: VPC A () and VPC B () that are connected via an active VPC peering connection. An EC2 instance in VPC A cannot establish a connection with an EC2 instance in VPC B. Which of the following routing table configurations are required to allow communication between the two VPCs? (Select TWO.)
- In the route table associated with the subnet in VPC A, add a route with a destination of and the VPC peering connection as the target.Answer
- In the route table associated with the subnet in VPC B, add a route with a destination of and the VPC peering connection as the target.Answer
- CIn the route table associated with the subnet in VPC A, add a route with a destination of and the Internet Gateway as the target.
- DIn the route table associated with the subnet in VPC B, add a route with a destination of and a NAT Gateway as the target.
- EIn the route table associated with the subnet in VPC A, add a route with a destination of and a Gateway VPC Endpoint as the target.
Answer
To allow communication between the two peered VPCs, routes must be added to the subnet route tables in both VPC A and VPC B pointing to the CIDR block of the peered VPC with the VPC peering connection as the target.
For two VPCs to communicate over a peering connection, bidirectional routes must be explicitly defined. The route table in the source VPC must point to the destination VPC's CIDR block using the peering connection ID as the target, and the route table in the destination VPC must have a corresponding route pointing back to the source VPC's CIDR block.
Step-by-Step Solution
Key Concept
VPC peering requires bidirectional routing updates in the subnet route tables of both VPCs involved in the peering relationship.