We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Application Load Balancer

I know that it looks like we're working on anything but ECS and containers at the moment, but I promise we're getting closer. We just have to shave a few more yaks.

Now it's time to start listening for traffic. To do that, we'll set up a Load Balancer and a Listener.

A load balancer sits in front of our service and distributes incoming traffic across your task(s). It handles things like health checks, SSL termination, and routing traffic to healthy containers. We'll place the load balancer in public subnets so it can receive traffic from the internet.

To make this work, we need several pieces:

  1. Load Balancer: The actual ALB that receives traffic
  2. Listener: Rules that tell the load balancer what to do with incoming traffic
  3. Target Group: These tell the Listener where to send that traffic (more on this next lesson).

Assignment

Create an Application Load Balancer named patientping-alb with a listener that returns a static response.

Cost check: This is the part that will cost money. An ALB costs about $0.0225 per hour (~$16/mo) plus data transfer costs. This is an important part to tear down when we tell you to.

      • Status code: 200
      • Content type: text/plain
      • Response body: Load balancer is working!

Run and submit the tests to verify your load balancer is configured correctly.