Reputation: 5297
As in title. I have elastic beanstalk instances set up as "load balanced, auto scaling", and would like to get beanstalk address from inside of its autocreated EC2 instances.
Is is possible?
Upvotes: 0
Views: 210
Reputation: 36103
The Elastic Beanstalk URL is an alias to the Elastic Load Balancer's URL.
elasticloadbalancing:DescribeLoadBalancers
. Instances
property.DNSName
of the matching ELB(s) will be the DNS name of your load balancer.Note: Above I allude to the fact that your EC2 instance may be attached to multiple load balancers. In reality, Elastic Beanstalk will only attach your EC2 instance to a single ELB, but for "completeness", you could allow for the possibility of multiple ELBs.
Upvotes: 3