VPC Peering via aws-cdk


I created 2 VPCs using aws-cdk. cdk is creating route tables dynamically when cloudformation stack is created. I created a peering connection between the two VPCs I created using CfnVPCPeeringConnection but I am not sure how to add route to vpc peering connection as I do not know what would be the RouteTableId.


You probably mean the peering connection id. Once you know it you can modify the routing tables.

In typescript, you get it this way

Leave a Reply