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."
Best Answer
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?:
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:
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.