AWS Certified Developer – Associate — Question 130
A company is planning to deploy an application on AWS behind an Elastic Load Balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses.
Which load-balancing solution meets these requirements?
Answer options
- A. Use an Application Load Balancer and the X-Forwarded-For headers.
- B. Use a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.
- C. Use an Application Load Balancer. Register the targets by the instance ID.
- D. Use a Network Load Balancer and the X-Forwarded-For headers.
Correct answer: A
Explanation
The correct answer is A because an Application Load Balancer supports the use of X-Forwarded-For headers, which allows the application to identify client IP addresses. Option B is incorrect as the proxy protocol is not required when using X-Forwarded-For with an ALB. Option C does not address the need for client IP visibility, and Option D is incorrect as Network Load Balancers do not utilize X-Forwarded-For headers effectively for this scenario.