1. AWS Documentation: Elastic Load Balancing User Guide. In the section on Application Load Balancers
it states: "When the load balancer sends a request to a target
the IP address of the private IPv4 address of the load balancer is used as the source IP address. ... To get the IP address of the client
use the X-Forwarded-For request header."
Source: AWS Documentation
Elastic Load Balancing User Guide
"Request headers and ALBs"
under "Listeners for your Application Load Balancers".
2. AWS Documentation: Elastic Load Balancing User Guide. A tutorial provides a specific example of this solution: "When you use an Application Load Balancer
the IP address of the client is not preserved. If you need the IP address of the client
you can configure your web server to log the X-Forwarded-For request header."
Source: AWS Documentation
Elastic Load Balancing User Guide
"Tutorial: Configure a web server on Amazon EC2 to log X-Forwarded-For headers".
3. AWS Documentation: CloudWatch User Guide. This document clarifies the role of the CloudWatch agent: "You can use the CloudWatch agent to collect both system-level metrics and log files from Amazon EC2 instances". This confirms its role is collection
not content modification.
Source: AWS Documentation
Amazon CloudWatch User Guide
"Collecting metrics and logs from Amazon EC2 instances and on-premises servers with the CloudWatch agent".