I have the following situation: I have 1 Rails App that has 2 domains, each of these domains has multiple/dynamical subdomains. This app is in AWS using a load-balanced Elastic Beanstalk.
What i need is that those 2 domains that points to my single Rails App to work under SSL in port 443.
But since Elastic Beanstalk has only one load balancer, I can only use one single SSL certificate on port 433 :( Using a UCC SSL certificate won't be the solution because i need each domain certificate to be wildcard, so the dynamic subdomains will also work.
Any thoughts about how to get multiple Load Balancers playing nicely with an Elastic Beanstalk Environment?
Best.
When you enable load balancing, AWS Elastic Beanstalk creates an Elastic Load Balancing load balancer for your environment. The load balancer distributes traffic among your environment's instances. Elastic Beanstalk supports these load balancer types: Classic Load Balancer – The Elastic Load Balancing previous-generation load balancer.
When you create a load-balanced, scaling environment and choose to use an Application Load Balancer, Elastic Beanstalk creates a load balancer dedicated to your environment by default.
Elastic Beanstalk treats rule priority settings as relative across environments sharing the load balancer, and maps them to absolute priorities during creation. Elastic Beanstalk creates a default security group and attaches it to the load balancer. You can configure one or more security groups to use for the load balancer.
aws:elbv2:listenerrule – Configure rules that route traffic to different processes, depending on the request path. Rules are unique to Application Load Balancers. aws:elasticbeanstalk:environment:process – Configure health checks and specify the port and protocol for the processes that run on your environment's instances.
To add multiple Elastic Load Balancers (ELB) to an Elastic Beanstalk (EB) application, you need to add the additional ELB to the auto scaling group of the EB app.
The easiest way to achieve this is through the AWS CLI (https://aws.amazon.com/cli/):
aws autoscaling attach-load-balancers --auto-scaling-group-name <SG_NAME> --load-balancer-names <ELB_NAME>
Of course this can be done in the AWS Console, too:
For your convenience, you can see where you need to click for all of the 5 steps (don't forget to save!)
For me this works also on eb-generated auto scaling groups (Region: eu-central-1).
This might not have been available at the time of the question, but it is now.
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