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?
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.
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.
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.
From the two options you provided, I will suggest to use the second option.
Follow the below steps.
Launch a ELB in AWS Console. If your EB instance is in a VPC then launch the ELB in the same VPC.
When you are launching the ELB attach the EB instance to that load balancer.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With