I was trying to set up VPC peering in AWS. I got most of it working but the network connectivity didn't work. I narrowed down the difference to the routes.
In my previous working system I had the VPC peering route in the main routing table, but when I terraformed a new system I tried to create a separate routing table with the VPC peering route but that didn't work.
I had to manually go to AWS console to add the route on the main route table for the communications to work.
Main route table controls the routing for all subnets that are not explicitly associated with any other route table
If your subnet is associated with a custom route table, put the peering route in the associated route table
https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html