An Application Load Balancer (ALB) is configured to route HTTP traffic on port 80 to a target group containing Amazon EC2 instances. The EC2 instances run a web application that automatically redirects all incoming HTTP requests to HTTPS (HTTP 301) to enforce encryption. The target group health checks are configured to use HTTP on the traffic port with the path `/`. The load balancer registers all EC2 instances as unhealthy. Which TWO actions should a SysOps administrator take to resolve this health check issue? (Select TWO.)
- Modify the target group's health check settings to include 301 in the Success codes (Matcher) range.Answer
- Configure the web server on the EC2 instances to return an HTTP 200 OK status code directly for health check requests without redirecting them to HTTPS.Answer
- CConfigure the target group's health check protocol to HTTPS and set the health check port to 443.
- DAssociate a Route 53 Active-Passive failover routing policy to route the load balancer health checks to a backup target group.
- EModify the stateless Network Access Control List (NACL) of the subnet to allow outbound ephemeral ports.
Answer
Modify the target group's health check settings to include 301 in the Success codes (Matcher) range, and configure the web server on the EC2 instances to return an HTTP 200 OK status code directly for the health check requests without redirecting them.
The correct responses involve updating the target group's Success codes (Matcher) to include 301, or configuring the web server to respond with 200 OK for health check paths without redirecting. This directly addresses the application's redirect behavior causing the default health check validation to fail.
Step-by-Step Solution
Key Concept
Application Load Balancer health checks require the target instances to respond with status codes that match the configured Matcher (default 200). If the instance redirects traffic (HTTP 301/302), the matcher must be updated, or the instance must bypass the redirect for health checks.