In my company's AWS cloud we have 4 VPCs, one for each of our major API environments (dev, test, stage, prod). In order to make these environments as similar as possible to each other they all have their CIDR block set to 10.0.0.0/16.
Now a need has arisen for us to create an internal service shared between these environments. For the sake of argument, let's say that this new service stores log data from all of these environments. This service exists in its own VPC with a CIDR block of 10.1.1.0/24.
At first I thought I'd be able to simply add peering connections from all the environment VPCs into the logging VPC. I ran into a hurdle when I started setting up the Route Tables though. I made a route table from Dev -> Logging which routes all traffic with destination 10.1.1.0/24. But I still can't connect to my logging server from within dev. It seems I need to add a route table for Logging -> Dev which routes all traffic with destination 10.0.0.0/16. This allows me to connect to the logging server from a dev server, but now I can't connect any of my other environments to the logging VPC.
The logging server never has to initiated a connection with my API servers, it only needs to receive and respond to connections. So my next thought was that I could use a NAT Gateway on each of the environment VPCs and then route those to the logging VPC. Unfortunately it seems that NAT Gateways are connected directly to the internet, and I don't want my logging VPC to be connected to the internet.
I feel like there must be a way to make this work, but I can't think of one. At the moment I feel like my only option is to create 4 logging VPCs and run separate logging servers in each of them, but from a cost perspective this doesn't really appeal to me.