Create Application Load Balancer
Create Application Load Balancer
- 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());

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

- 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())
