Application Load Balancer (ALB)
Frontend traffic distributor providing SSL termination, HTTP routing rules, path-based load balancing, and health-check monitoring across compute fleets.
AWS Container Placement
SUBNET
Summary
Elastic Load Balancing Layer-7 load balancer routing HTTP/HTTPS traffic to targets based on content.
When to Use (SAA-C03)
Use for HTTP/HTTPS microservices, path-based routing (/api vs /web), and WebSockets; use NLB for raw TCP/UDP or static IPs.
Allowed Ingress Connections & Ports
| Source Service | Protocol | Port | Architectural Rationale |
|---|---|---|---|
| WEBCLIENT | HTTP, HTTPS | 80, 443 | Public web browsers and API consumers |
| CLOUDFRONT | HTTPS | 443 | CloudFront CDN edge origins routing through custom headers |
| WAF | INSPECT | 80, 443 | AWS WAF deep packet inspection barrier |
Allowed Egress Targets & Ports
| Target Service | Protocol | Port | Data Flow Rationale |
|---|---|---|---|
| TG | HTTP, HTTPS | 80, 443, 8080, 3000 | Target Group forward action |
| EC2 | HTTP, HTTPS | 80, 8080, 443 | Direct compute node instance targets |
| ECS | HTTP | Dynamic Container Ports | ECS container task definitions |
| LAMBDA | HTTP | N/A | Serverless Lambda function invocation targets |
Key Configuration Parameters & AWS Best Practices
| Parameter | Format / Example | Purpose & Rationale |
|---|---|---|
| Load Balancer Scheme (albScheme) (Required) | internet-facing | Determines whether the ALB resolves to public IP addresses or private VPC IPs. Why: AWS configures route tables and public DNS resolution differently for internet-facing vs internal ALBs. |
| Subnet Attachments (albSubnetIds) (Required) | subnet-pub-1a, subnet-pub-1b | Specifies the Availability Zones and subnets where ALB elastic network interfaces are spawned. Why: AWS ALB requires at least 2 distinct Availability Zones for multi-AZ fault tolerance and routing. |
| Security Groups (securityGroupIds) (Required) | sg-alb-public (Allows 0.0.0.0/0 on 80/443) | Defines firewall filtering rules for ALB public listeners. Why: Without a security group rule allowing inbound port 80/443, all client requests are blocked at the ingress boundary. |
| WAF Web ACL Association | AWS WAF Web ACL ARN | Attaches Layer 7 Web Application Firewall rules to block OWASP threats and DDoS attacks. Why: Protects backend servers from bot abuse, SQL injections, and credential stuffing attacks. |
| Idle Timeout (Seconds) | 60 | The maximum duration the ALB keeps an idle TCP connection open before terminating it. Why: Long-running API calls or file uploads may require bumping this to 300s. |
| Drop Invalid Header Fields | true | Blocks HTTP requests containing invalid HTTP header syntax. Why: Hardens security posture against HTTP smuggling exploits. |
Practice Labs Using Application Load Balancer
Single Point of Failure (Single-AZ)
Add a secondary subnet in us-east-1b and front instances with an Application Load Balancer across both Availab…
SAA-04E-Commerce Flash Sale: ALB 502 Bad Gateway Port Mismatch
Reconcile Target Group port to match the backend EC2 application port (80) to restore healthy status.…
SAA-06Streaming Media Platform: ASG Max Capacity Bottleneck
Increase ASG maximum capacity to at least 6 to absorb live traffic surges.…
SAA-08Multi-Tier Highly Available Web Architecture: Dual-AZ ALB, ASG Fleet & Multi-AZ RDS
Re-architect for multi-AZ high availability: map the public ALB across dual AZs (us-east-1a and us-east-1b), d…
SAA-12Publish Private Compute: Secure Route 53 CNAME & Dual-AZ ALB Reverse Proxy
Expose the private EC2 compute service via an Internet-Facing ALB spanning two public AZs, configure Target Gr…
SAA-GLOBAL-ACCELERATORGlobal Low-Latency Ingress: Global Accelerator Anycast Failover
Deploy AWS Global Accelerator with static Anycast IPs directing traffic to regional load balancers with instan…
Frequently Asked Questions
Where does Application Load Balancer live inside an AWS VPC architecture?
Valid container placement: SUBNET. Frontend traffic distributor providing SSL termination, HTTP routing rules, path-based load balancing, and health-check monitoring across compute fleets.
When should I use Application Load Balancer on the AWS SAA-C03 exam?
Use for HTTP/HTTPS microservices, path-based routing (/api vs /web), and WebSockets; use NLB for raw TCP/UDP or static IPs.
Can I simulate Application Load Balancer packet routing without an AWS account?
Yes. CloudTracer simulates Application Load Balancer along with 53 AWS services directly in your browser and exports production Terraform HCL.