I am a little new the Amazon EC2 and to networking, so I apologize in advance if this is a stupid question.
I want to create a VPC in EC2 with two subnets: public for the web application instance, and private for databases instances.
The thing is, my application requires several external IPs. I actually just need to initiate curl calls from the private instance(s) to different external IPs. Each private instance should have access to all external IPs. For the incoming route, one IP should be enough.
Using VPC&NAT gateways I was able to make curl from the private instance to internet pages, but I was only able to connect one elastic IP to a NAT, and I have found no way to add additional elastic IPs to existing NAT.
I think that I can make it work with putting two proxy servers on an instance in the public subnet listening on two ports and forwarding to the elastic IPs, but I couldn't get rid of the HTTP_X_FORWARDED_FOR in the header.
I imagine that it must be possible somehow. It should be similar to the case of several websites with different IPs in the same VPC. Is there a way to do that?