The Application Load Balancer (ALB) serves as the entry point for all incoming traffic to our platform. It distributes requests to the appropriate containers (Frontend or Backend) and handles SSL termination.
Before creating the load balancer, we need a firewall rule that allows public access.
alb-sg.Allow http and https traffic.band-up-vpc.HTTP | Port: 80 | Source: Anywhere-IPv4 (0.0.0.0/0).HTTPS | Port: 443 | Source: Anywhere-IPv4 (0.0.0.0/0).
The ALB needs to know where to route the traffic. We will create a Target Group for our Frontend service first.
target-bandup-fe.HTTP.3000 (Our Next.js frontend runs on port 3000).band-up-vpc.

Now, we aggregate everything into the Load Balancer.
Step 1: Basic Configuration
bandup-public-alb.Internet-facing (To allow public access).IPv4.

Step 2: Network Mapping
band-up-vpc.ap-southeast-1a and ap-southeast-1b).public-subnet-1 and public-subnet-2) created in the previous section.
Step 3: Security Groups & Listeners
alb-sg.HTTP | Port: 80.target-bandup-fe.
Your ALB is now provisioning. Once active, it will be ready to route traffic to your frontend application.