UPDATE: Minor rewrite for the new blog hosting. Should have no incorrect info.
When using Amazon's Elastic Load Balancer, and probably any load balancer, you lose normal access to the requestor's IP address. ELB appends the missing IP address to the X-FORWARDED-FOR header, so if your application uses this information you will need to use this variable. Header values are spoofable, but the solution is fairly simple. This solution is presented for Apache HTTPD.
X-FORWARDED-FOR is an HTTP header field for recording the originating IP address as a browser request passes through HTTP proxy and load balancer servers.
After enabled mod_headers (this may no longer be necessary w/ SetEnvIf), add the following line to your site's Apache configuration:
SetEnvIf X-FORWARDED-FOR (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*$ UpstreamIpAddress=$1
This will set the UpstreamIpAddress variable with the last IP address in the list, which will always be the one accessing the load balancer. Obviously, any proxy servers, firewalls, or other servers that change the IP address before reaching the load balancer would will conceal the true client IP address.
If the IP address is important to you, you'll also want to update your access logger format:
LogFormat "%{UpstreamIpAddress}e %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" combined_using_upstream_ip_address
If you need this value in your application, you can look for it in the request environment variables:
Ruby on Rails: request.env
PHP: $_SERVER