Issue with IPs when using Piwik behind a loadbalancer

I have 2 Piwik servers with same config files behind an AWS loadbalancer. Both are connected to the same database since the config is the same.
I’m getting load balancer’s IP in the request instead of the client IP. Which is causing trouble with IP2Location plugin. IP of all user is showing the same in my dashboard.

I referred to this - How do I configure Piwik when the server is installed behind a proxy? FAQ - Analytics Platform - Matomo
Added following lines to the config.ini.php file
proxy_client_headers[] = HTTP_X_FORWARDED_FOR
proxy_host_headers[] = HTTP_X_FORWARDED_HOST

Still no luck. Any ideas to make this work?

Well the only thing I can think of is making sure that the proxy is sending those headers. If they have another name on AWS then you might need to specify those.