SSL certificate installation issue in AWS - amazon-web-services

I try to install the SSL certificate in my AWS ec2. Here are the steps which I follow.
1 - Request certificate from certificate manager services.
2 - Verify the certificate with the DNS method(Add Cname record in
hosted zone of the domain).
3 - Make a load balancer and install the certificate in ec2 instance.
4 - Add .htaccess www and https redirect for the URL.
But when I open my website, it still shows 'Not Secure'. When I try to check the SSL certificate via 'Online SSL Checker'. I didn't find my certificate. It shows some error 'No SSL certificates were found on domain.com. Make sure that the name resolves to the correct server and that the SSL port (default is 443) is open on your server's firewall.'. Please help.

Please check the following
If there is a HTTPS listener in your load balancer
The security group
attached to the load balancer allows HTTPS traffic from port 443
You have added a alias A Record in your domain name pointing to the dns hostname of your elastic load balancer

Related

Aws loadbalancers are not secure with browser even with ACM

I have a domain example.com and I want to have https access with subdomain my_subdomain.example.com with aws loadbalancer
I have loadbalancer open for 443 and have route53 cname my_subdomain.example.com point to my loadbalancer address. I can access the site in my ec2 using browser on my_subdomain.example.com however its not secure in browser
My ACM has approve for both example.com and *.example.com
Is there an extra step I need for https to work, because when I do it with a single server with nginx I use https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx so I imagine I need a similar step
Can someone point me a direction?
Use AWS Certificate Manager for your certificate: it will provide a free certificate you can install on your load balancer. When you add the listener for port 443, step 3 will prompt you for a certificate, select 'Choose a certificate from ACM (recommended)'.

Elastic Beanstalk with Classic Load Balancer working with HTTP but not HTTPS

I have set up a load Balancer to my elastic beanstalk app. It has provided a DNS / URL which works on http.
I have set up my domain on Route 53. I'm trying to make it work with HTTPS for a subdomain app.example.com
I have set up a wildcard certificate using ACM *.example.com.
I have enable HTTPS and port 443 on the loadBalancer. But I can't access it using the domain name https://app.example.com but works with http://app.example.com
In Route 53, I have created an A record with Alias set to the load Balancer DNS Name.
I have gone through tonnes of answers on stackoverflow but nothing worked for me. No idea what I'm missing.
You do not need to map 443 of the target as the TLS will terminate before sending the request to target.
Map 8080 port of the target to 443 of the load balancer.
Below diagram show SSL/TLS termination work with ALB.
SSL Certificates
To use an HTTPS listener, you must deploy at least one SSL/TLS server
certificate on your load balancer. The load balancer uses a server
certificate to terminate the front-end connection and then decrypt
requests from clients before sending them to the targets.
/application/create-https-listener
This is what worked for me. Changing Instance Protocol to HTTP in first row and changing Instance Port to 80.

AWS certificate manager https configuration for domain

I have a slight problem with SSL.
Currently if I were to route to my domain as example.com, it goes to the http version instead of the https version.
However, if I were to force https://example.com, it stays as https://example.com
I'm wondering what I have to do on the certificate manager side of AWS to get https working when I type in example.com without the https.
I have already configured my route 53 aliases for my domain to route to my elastic beanstalk url. I also have an SSL certificate for my domain example.com and *.domain.com that were both validated successfully, that are Amazon issued and also In Use.
Have you tried redirecting http traffic (80) to https (443)? This answer contains the steps
For ALBs, you can follow the below steps,
1.Add lister for https and forward the traffic to the target group
2.Add Lister for http and forward the traffic to https
Final Setup:

ERR_INSECURE_RESPONSE error while hosting my frontend on AWS using cloudfront and backend on a EC2 behind a loadbalancer

I am trying to host my frontend on AWS using cloudfront and backend on a EC2 behind a classic loadbalancer. I have imported my SSL certificate in ACM. Using ACM the certifcate has been installed on Cloudfront and classic Loadbalancer.
Cloudfront configuration:
Alternate Domain Names (CNAMEs) = mydomain.com
SSL Certificate = mydomain.com (xxx-yyy-zzz............)
Classic loadbalancer Configuration:
The load balancer is hosted on api.mydomain.com and SSL certificate installed using ACM.
Security group inbound rules configuration:
EC2 is running a Nodejs server listening on port 80. I haven't installed SSL certificate on EC2 because it was not mentioned in AWS documentation.
The home page opens up but when I try to login I get an error:
LoginSignUp.js:84 OPTIONS https://api.mydomain.com/user/signin net::ERR_INSECURE_RESPONSE
So the browser is blocking backend response because it is not secure. Do I need to install SSL certificate on EC2 also? Or did I make any configuration mistake?
It appears from your question that your SSL certificate is for mydomain.com and you are trying to request api.mydomain.com
Create a new ACM certificate that includes api.domain.com as either the domain name or as a Subject Alternative Name (SAN).
At a glance, the rest of the build looks correct.

Issues in setting up https for domain. Files are on Amazon Beanstalk

I want to setup https for my domain name. My files are on AWS Beanstalk(php website)
I have my namecheap ssl for the domain registered.
On EC2 Console:
The ELB was configured by default. I added my SSL to I AM and attached with the ELB that was created with the project. I want to terminate the HTTPS requests from the web at my ELB and send http requests to my instance.
Security groups:
ELB: the default elb (http, https and ssh ports configured) and default vpc is attached to ELB(http and https configured. source is 0.0.0.0 for all)
Instance: default vpc security group is attached.
When I try to do https://the_aws_elb_link :
chrome error: NET::ERR_CERT_COMMON_NAME_INVALID
safari error: host name mismatch
I checked md5 for all the ssl uploads made. They check out.
When I try to enter my domain name with https: This site can’t be reached
What I want: https://www .mydomain .com and authentication at my ELB
elb listners configured
CNAME settings
You need to set up the ELB listeners this way then it will work.
Your Domain is pointing to the EC2 IP address it should point to the AWS ELB C-Name then it will serve the SSL Certificate.
ping www.lbacs.org
PING www.lbacs.org (98.124.199.6): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1