I have a Laravel application running on Elastic Beanstalk. The app works fine with one EC2 instance running, but whenever EB scales and adds a second instance, the app redirects all requests back to the login page, and eventually fails with a ERR_TOO_MANY_REDIRECTS error. EB eventually scales back down to one instance, and everything works fine again.
I've followed the AWS steps here to redirect HTTP to HTTPS using listeners. The problem seems similar to this one, but I have an Application Load Balancer rather than a Classic LB, I've set up the redirect the "right" way, and I've make sure there are no other redirects set at the nginx or .htaccess level.
I am using Laravel's URL::forceScheme('https') to rewrite links as https, but I don't believe this has any affect on redirects.
Can anyone advise on next steps for debugging? For now, the only preventative workaround I've found is to limit EB to a single instance.