Add Listener to Application Load Balancer

Add Listener to Application Load Balancer

  1. Initialize an ApplicationListener:
ApplicationListener applicationListener = productsServiceProps.applicationLoadBalancer();

Architect

  1. Add a listener with the ID ProductsServiceAlbListener and initialize ApplicationListenerProps:
   .addListener("ProductsServiceAlbListener", ApplicationListenerProps.builder()
       .build());

Architect

  1. Next, configure the ALB listener on port 8081 using the HTTP protocol:
   .port(8081)
   .protocol(ApplicationProtocol.HTTP)

Architect

  1. Finally, add the applicationListener to the Application Load Balancer:
   .loadBalancer(productsServiceProps.applicationLoadBalancer())

Architect