I need to use an external web API for my site, and they ask me what the IP address will be, where the requests will come from. The fact is, my web application scales to multiple instances of Amazon EC2, as it is deployed using Elastic Beanstalk with automatic scaling.
What would be the best solution to the problem?
The best I can think of is to create a micro-instance, bind Elastic IP to it and use it as an HTTP proxy. Is there a better solution?
I am sure that I am not the only one who has this problem, but I could not find another question like mine in stackoverflow. Many e-commerce websites typically use an external payment system that requires requests to come from one or more specific IP addresses ...
Thanks.
Update - thanks to @David, I installed the HTTP proxy using the Apache mod_proxy module. How to configure it so that only my EC2 instances can access it? My EC2 instances are dynamically created with auto-scaling.
ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from ??? </Proxy>
source share