I've been struggling and googling this issue for a while and although it seems to me like a pretty standard requirement I couldn't find a working solution anywhere.
I don't want to disable HTTP, only redirect it to HTTPS. Not between the load balancer and the EC2 instances, but between the browser and the load balancer.
I have created an Elastic Beanstalk environment (Linux) for my Spring Boot app,
configured the load balancer for HTTP + HTTPS using the management console and
configured environment variables and IP tables using .config files in an .ebextensions
folder zipped with the app's JAR file.
Then I tried adding an NGINX configuration for a permanent HTTP to HTTPS
redirect using a config file with a "files" key, but it doesn't seem to have any effect.
Thanks