Create Application Load Balancer

Create Application Load Balancer

  1. First, let’s create an Application Load Balancer (ALB). To create the ALB, we need to initialize the applicationLoadBalancer object within the constructor:
   this.applicationLoadBalancer = new ApplicationLoadBalancer(this, "Alb",
       ApplicationLoadBalancerProps.builder()
           .build());

Architect

  1. Next, set the name for the Application Load Balancer (ALB) to ECommerceAlb using:
.loadBalancerName("ECommerceAlb")

Architect

  1. As mentioned earlier, we will not expose the Application Load Balancer (ALB) and Network Load Balancer (NLB) to the internet outside of the VPC. Therefore, we will configure them as follows:
   .internetFacing(false)
   .vpc(nlbStackProps.vpc())

Architect