I have seen this question : Static IP address for outgoing traffic from AWS autoscaling group but it doesnt seem to fit exactly what im trying to do.
Here's the scenario:
I have a autoscaling group of web servers that receive traffic from an ELB. This is working fine for incoming web traffic.
The issue is that i have a number of outside services that these web servers need to connect to. These services require that i provide the vendor an IP address so they can whitelist my servers making the requests. I am trying to create a NAT instance so outbound requests coming from these web servers will all appear to be coming from one IP (since the scaling group could have any IP that is auto assigned).
All the scenarios from AWS revolve around giving a private subnet access to the internet through a NAT. In this case, i need to only route requests originating from these boxes through the NAT. incoming web traffic should still work like normal with the responses passing directly through the internet gateway.
When i try to set this up, by modifying the main route table to send outbound traffic through the NAT, everything stops working (i assume because there is no rule for routing traffic through the internet gateway since i just changed it to the NAT)
Hopefully this makes sense. Any suggestions would be greatly appreciated.