AWS Certified Developer – Associate (DVA-C02) — Question 216

An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally.

Based on this scenario, what is the MOST cost-effective solution to this problem?

Answer options

Correct answer: C

Explanation

The correct answer is C because inspecting the X-Forwarded-For header allows the application to retrieve the original client IP address while still using the ALB. Options A and B would eliminate the benefits of using a load balancer, and option D would require additional changes for a custom header that complicate the architecture without necessity.