aws elasticbeanstalk with static public ip
For a new web application I am looking at AWS ElasticBeanstalk.
I like its auto-balancing and auto-rolling updates' system as well as all the other scaling-related features.
But.. I need a static IP in order to communicate with a webservice api.
What would be the optimal solution here?
- skip EB to manual ec2 with balancers
- EB in VPC with frontier elastic IP
- avoid AWS altogether
- something else
You can use Elastic Beanstalk along with a VPC for your scenario.
- Use a VPC with public and private subnets.
- Add a NAT to a public subnet and give it an Elastic IP address.
- Ensure all traffic from the private subnets goes through your NAT.
- Create your Elastic Beanstalk application, placing the ELB in a public subnet and the EC2 instances in one or more private subnets.
All incoming traffic will hit your ELB and funnel to your EC2 instances. When your EC2 instances access the web service API, traffic will go through the NAT, thus appearing to originate from the static IP address.