Reputation: 11
I'm trying to get my AWS Elastic Beanstalk environment to use HTTPS...however, when I open my site in a browser it is showing an insecure connection.
I'm not sure if this is an issue with my security groups or load balancer configuration...
Upvotes: 1
Views: 1213
Reputation: 2865
You should assign a certificate to your environment's load balancer:
Open the Elastic Beanstalk console.
Navigate to the management page for your environment.
Choose Configuration.
On the Load balancer configuration card, choose Modify.
Note
If the Load balancer configuration card doesn't have a Modify button, your environment doesn't have a load balancer.
On the Modify load balancer page, the procedure varies depending on the type of load balancer associated with your environment.
Classic Load Balancer
Choose Add listener.
In the Classic Load Balancer listener dialog box, configure the following settings:
For Listener port, type the incoming traffic port, typically 443.
For Listener protocol, choose HTTPS.
For Instance port, type 80.
For Instance protocol, choose HTTP.
For SSL certificate, choose your certificate.
Choose Add.
Application Load Balancer
Choose Add listener.
In the Application Load Balancer listener dialog box, configure the following settings:
For Port, type the incoming traffic port, typically 443.
For Protocol, choose HTTPS.
For SSL certificate, choose your certificate.
Choose Add.
Note
If the drop-down menu doesn't show any certificates, you should create or upload a certificate for your custom domain name in AWS Certificate Manager (ACM) (preferred), or upload a certificate to IAM with the AWS CLI.
Choose Apply.
Reference: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html
Edit: If you're issue is related to untrusted certificate, follow these steps: https://aws.amazon.com/pt/premiumsupport/knowledge-center/acm-certificate-error-https/
If you imported a self-signed certificate using AWS Certificate Manager (ACM), the certificate might not be trusted by some browsers. To resolve this error, Request a Certificate using ACM or contact your CA.
Upvotes: 4