I have a working application on Elastic Beanstalk and would like to make it accessible ONLY through HTTPS. Because I would like for the application to scale automatically, I need to configure HTTPS at the Load Balancer level and not the single EC2 instance level. I am following this tutorial on how to configure HTTPS with Elastic Beanstalk. However, when I finish the tutorial, my domain never loads (on http or https) and I get a session timeout in the browser.
Here's what I have so far:
- Working application on Elastic Beanstalk. Specifics: Java EE app running on a pre-configured Glassfish Docker container.
- A valid domain from Route 53 that is set up to my Elastic Beanstalk application.
- A signed certificate from GoDaddy, that was created and uploaded to IAM according to the tutorial link I provided.
Now, this is the part where I believe the problems arise. Step 4 of the tutorial tells me that I have to update my Security Group (very ambiguous as to what one). So, I update the Load Balancer Security Group like so (remove http requests and only support https):
Then, in the Elastic Beanstalk Environment Configuration Settings, I set it up like so:
(If I turn the listener port off then the domain never loads on either http or https). With these settings, if I go to my domain (ex: myapp.com) it'll continue loading until the browser displays a timeout exception. If I specify the protocol (ex: https://myapp.com) it'll continue loading until the browser displays a timeout exception. If I go to a specific link with the HTTPS protocol specified (ex: https://myapp.com/login.xhtml) then it will load (Note: app works fine before attempting to apply SSL; welcome page is set up with server). What am I doing wrong?
Question summed up: How do I configure my Elastic Beanstalk application to work ONLY over HTTPS?
Desired result: User types app domain in their address bar (ex: myapp.com) and it brings them to my application secured with HTTPS (ex: https://myapp.com).