AWS Certified Developer – Associate (DVA-C02) — Question 107
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 choice is A, as using an Application Load Balancer with the X-Forwarded-For headers allows the application to access the original client IP addresses. Option B, while it mentions proxy protocol, does not align with the need for HTTP/HTTPS listeners. Option C does not address the requirement for client IP access, and option D incorrectly pairs the Network Load Balancer with X-Forwarded-For, which is not supported.