Search code examples
amazon-web-servicesserverclouddevopsamazon-elb

How can I configure multiple HTTPS listeners for both front-end and back-end applications in an Application Load Balancer (ALB)?


How can I optimize my AWS infrastructure by consolidating multiple Elastic Load Balancers (ELBs) into a single load balancer while still maintaining HTTPS along with ssl certificates.we are using subdomain for each port for multiple applications running on different ports (8080, 8081, 8585, 80) without incurring additional costs? Looking for advice and best practices for configuring HTTPS listener ports on a single load balancer to achieve this goal.

someone can provide a solution that includes clear and detailed examples for achieving my requirements. I'm looking for practical advice and guidance on how to configure a single load balancer to support HTTPS for multiple applications on different ports (e.g., 8080, 8081, 8585, and 80) while effectively consolidating my AWS resources to save costs.


Solution

  • You can use host-based routing.

    It goes like this:

    ALB Listeners enter image description here

    HTTPS:443 Rules enter image description here

    Then you can add all you certificates in this single load balancer. Note that there's a quota of 25 certificates per LB, but it can be increased if you need more.

    https://aws.amazon.com/blogs/aws/new-host-based-routing-support-for-aws-application-load-balancers/