Reputation: 91
I currently have an elastic beanstalk setup in AWS currently whenever i make API calls it is coming from the EC2 instance's external IP. is there a way to have all servers in that group use the same IP?
Upvotes: 0
Views: 248
Reputation: 36073
Put your EC2 instances in private subnets and direct all outbound traffic through a NAT. This way, all outbound connections appear to come from the NAT's IP address.
See the following for more information. It's a different problem, but the NAT solution is the same.
How do you allocate STATIC addresses to an EBS (beanstalk) within a VPC?
Note, for security, you should follow this architecture anyways. When using ELB, don't have your EC2 instances in a public subnet.
Upvotes: 3