Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic Beanstalk - add load balancer to app retroactively

I got a new domain and want to change my Elastic Beanstalk app name from domain-name.elasticbeanstalk.com to www.domain-name.com. When I created the EB app, I chose Single Instance.

I followed these instructions to set up the domain. I selected my load balancer, but my domain seems to map to another app I have. This seems to be because I only created one load balancer with another EB app, and not the current app I am trying to map the domain to.

My questions are:

1) How can I use the single load balancer (associated with a different app) to point the domain correctly? This is probably not possible.

2) How can I retroactively add a load balancer to an existing EB app? Or do I have to recreate the EB app and add the Load Balancer at that point?

like image 485
user3871 Avatar asked Sep 07 '16 12:09

user3871


People also ask

How do I add a load balancer to an existing Elastic Beanstalk?

In the Load balancer configuration category, choose Edit. Select the Classic Load Balancer option, if it isn't already selected. Make any Classic Load Balancer configuration changes that your environment requires. Choose Save, and then make any other configuration changes that your environment requires.

Does Elastic Beanstalk use application load balancer?

In an Elastic Beanstalk environment, you can use an Application Load Balancer to direct traffic for certain paths to a different process on your web server instances. With a Classic Load Balancer, all traffic to a listener is routed to a single process on the backend instances.

What is the difference between elastic load balancer and application load balancer?

One of the most significant differences between ALB and ELB lies in the system of their routing process. While ELB only routes traffic based on routing number, ALB facilitates context-driven routing based on multiple references, including query string perimeter, source IP, port number, hostname, and path.


1 Answers

From the two options you provided, I will suggest to use the second option.

  • EB = Elastic Beanstalk
  • ELB = Elastic Load Balancer

Follow the below steps.

  1. Launch a ELB in AWS Console. If your EB instance is in a VPC then launch the ELB in the same VPC.

  2. When you are launching the ELB attach the EB instance to that load balancer.

  3. Then you can point your domain www.domain-name.com to that ELB using Route 53.

Or you can change your environment type from single instance to Load Balancing Environment. In this case, check below user Guide:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-types.html?icmpid=docs_elasticbeanstalk_console

like image 167
error2007s Avatar answered Nov 02 '22 03:11

error2007s