Course contentsShow
← Cloud and Infrastructure
Lesson 260 of 2,9895. Load Balancing and Traffic ManagementFree lesson

ALB Security Features and WAF Integration

Implement security groups, enable deletion protection, and integrate with Web Application Firewall for threat protection.

ALB Security Features and WAF Integration

What you'll learn: How to secure your Application Load Balancer with security groups, deletion protection, and AWS Web Application Firewall (WAF).

Core Security Layers

Just like a building needs locks on doors, cameras, and security guards, your ALB needs multiple layers of protection. ALB security features work together to defend your applications from both network-level attacks and sophisticated web threats.

Security Groups for ALB

Security groups act as virtual firewalls that control inbound and outbound traffic to your load balancer. For an ALB, you typically:

  • Allow inbound traffic on ports 80 (HTTP) and 443 (HTTPS) from the internet (0.0.0.0/0)
  • Allow outbound traffic to your target instances/containers
  • Reference security groups from target instances to only accept traffic from the ALB

This creates a protective chain: internet → ALB security group → target security group → your application.

Deletion Protection

Deletion protection is a safety switch that prevents accidental removal of your load balancer. When enabled, you cannot delete the ALB until you explicitly disable this setting first. Think of it as a "confirm twice before destroying" safeguard—critical for production environments.

Web Application Firewall (WAF) Integration

AWS WAF inspects incoming HTTP/HTTPS requests at Layer 7, looking for malicious patterns. You can attach WAF rules to your ALB to:

  • Block SQL injection attempts
  • Prevent cross-site scripting (XSS)
  • Rate-limit requests from specific IPs
  • Filter requests based on geographic location
  • Create custom rules for your application's threats

WAF sits in front of the ALB, filtering bad requests before they ever reach your routing rules.

Key Takeaway: Secure your ALB with security groups for network control, enable deletion protection for production stability, and integrate AWS WAF to defend against application-layer attacks like SQL injection and XSS.