title: Static IP for outbound API calls
body: <p>A new api service we use requires that we give them a list of all the IP addresses our calls will be coming from; if we make an api call from any other IP address, the call will fail.</p>
  
  <p>This question <strong>has</strong> been asked before here, but I'm wondering if in 2019 there is any <strong>simpler/easier/lower cost</strong> solution.</p>
  
  <p><strong>Our Setup</strong></p>
  
  <ul>
  <li>Elastic Beanstalk, which currently scales to anywhere from 5 - 50 ec2 instances for our web application based on traffic</li>
  <li>An Application Load Balancer</li>
  <li>Also have a worker tier, which would be available for use if that might be helpful</li>
  <li>Typically these api calls would be coming from any of our web tier ec2 instances, as the calls will be based on a user interaction. We can of course set up something different, e.g. have the worker tier make the calls</li>
  </ul>
  
  <p><strong>Solutions I've Found</strong></p>
  
  <ul>
  <li><p>Give each ec2 instance an elastic (static) ip address. This is not a great solution for us, because as we hopefully continue to scale the number of ip addresses needed will continue to grow {<a href="https://stackoverflow.com/a/13767717/3650835">ref</a>}</p></li>
  <li><p>Set up two NAT instances (one not being sufficient as it would be a single point of failure). I'm hoping there is something simpler and lower cost than this option. {<a href="https://stackoverflow.com/a/13767617/3650835">ref</a>} {<a href="https://aws.amazon.com/articles/high-availability-for-amazon-vpc-nat-instances-an-example/" rel="nofollow noreferrer">ref</a>}</p></li>
  <li><p>Create new ec2 instances and put them behind a Network Load Balancer. Again, complex and costly. {<a href="https://stackoverflow.com/a/46785590/3650835">ref</a>}</p></li>
  </ul>
  
  <p>Are there any new, easier, less costly solutions? I have never used AWS Lambda before; maybe it is be possible to run Lambda functions all from one IP address? I don't have many ideas beyond that at this point. Thanks for your time.</p>