We have multiple SSL certificates for a group of EC2 server (due to legacy constraints). We have multiple ELBs pointing at this group, each terminating the SSL for a specific certificate. We now want to move to auto-scaling instead of a hard-coded list of EC2 instances. Will a single auto-scaling group work with multiple ELBs?
Yes it works (we do this since some years). The autoscaling group automatically attaches new instances to each ELB. If you use the command line tools you can create an autoscaling group with multiple ELBs, e.g.:
as-create-auto-scaling-group mygroup ... --load-balancers lb1,lb2,lb3
Once you've created the group, you cannot update the list of load-balancers. If you want to update the list of ELBs in a group you need to create a new one and delete the replaced one. Simple as that.
It should work, but the autoscaling mechanism will only automatically associate your instances with 1 load balancer.
You will need to add some kind of health check scripts which can associate/disassociate instances as your auto scaling group scales up and down. You may be able to run these as start up and showdown scripts on the instances themselves.
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