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 it looks like we're working on everything 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 our 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 a few different 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 later).

Assignment

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

Cost check: In us-east-1, an ALB costs $0.0225/hr, plus usage and data transfer charges. Our two-AZ setup also uses at least two public IPv4 addresses at $0.005 per address per hour.

That's $0.0325/hr (~$24/mo) before usage and data transfer. 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!
  1. We've only configured an HTTP listener, so include the http:// prefix. You should see the message Load balancer is working!.

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