Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can give a single instance an Elastic IP. No problem.

But I have an Elastic Beanstalk app. It can create and remove instances as needed. It has a load balancer. How can I get these features (Elastic IP and Elastic Beanstalk) to work together?

Ultimately, all I want to do is make calls to my server through my domain like this: mydomain.com/someApiCall and I don't want to worry about my Elastic IP becoming "detached."

share|improve this question

2 Answers 2

That is currently not possible and actually a limitation of the Elastic Load Balancing (ELB) in use, see e.g. Why does Amazon not allow assigning an Elastic IP to an Elastic Load Balancer?:

The elastic load balancer is simply a collection of individual software load balancers hosted within EC2, with DNS load balancing traffic among them. The pool can contain many IPs, at least one per availability zone, and depending on traffic levels.

D.Svanlunds's answer to Load balancers and elastic IP provides a good summary of why ELB is designed this way, and Shlomo Swidler's The “Elastic” in “Elastic Load Balancing”: ELB Elasticity and How to Test it provides an early but in-depth analysis of the ELB architecture and the implications for testing a web application in this context.


Update

Regarding your comment: You are communicating with your AWS Elastic Beanstalk application via the DNS name mapped to the Elastic Load Balancer, to which you can map a CNAME record in turn as usual, see Overview of Elastic Load Balancing:

Elastic Load Balancing automatically generates a DNS name for each load balancer. You can map any other domain name (such as www.example.com) to the automatically generated DNS name using CNAME or use an Amazon Route 53 alias for the load balancer's DNS name.

Further details can be found in Using Domain Names With Elastic Load Balancing, which describes how to associate your Elastic Load Balancing instance with a custom domain name — including subdomain names and the zone apex.

share|improve this answer
    
How can I create an API with Beanstalk if I can't direct requests through the load balancer? How do I properly communicate with my Beanstalk app? –  Geoff Noble Feb 18 '12 at 3:01
1  
@GeoffNoble: I'm not sure I can follow, why should a call to example.com/resource provided by an API hosted on Elastic Beanstalk not work as expected? I've expanded my answer regarding Using Domain Names With Elastic Load Balancing to hopefully clarify the underlying concept - good luck! –  Steffen Opel Feb 23 '12 at 21:46

If you access your app through mydomain.com/someApiCall, the Elastic IP is not even in the picture. The ElasticBeanstalk gives you an url that looks like this:

http://myapp.elasticbeanstalk.com

you can just have your domain forward to myapp.elasticbeanstalk.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.