Getting SSL to Work with AWS ALB for My Spring Boot App

0
8
Asked By TechieTurtle42 On

Hey everyone! I'm working on setting up SSL for my Spring Boot application running in a Docker container on an EC2 instance. I've attached an Elastic IP to the instance and created an Application Load Balancer (ALB) with a certificate generated via AWS Certificate Manager (ACM). I've double-checked that my security group allows HTTPS traffic. However, when I access the load balancer's DNS, I still see a warning saying 'connection to this site is not secured'. The certificate details look fine, showing a valid Common Name. My target group is set to port 443, and the load balancer listener is also configured for HTTPS on port 443. What might I be missing to ensure a secured connection when accessing the load balancer?

3 Answers

Answered By NetworkingNinja99 On

Just a side note, typically, you want your ALB on the public network. There's no need for the EC2 instance to be public; you can keep it in a private subnet as long as the ALB can communicate with it.

Answered By CloudGuru21 On

Make sure the certificate matches the domain you're accessing. If your certificate is for 'your-super-app.com', you need to hit that URL in the browser. You should also set up a DNS record pointing your domain to the ALB. Here's a helpful guide on associating the certificate: [AWS Guide](https://repost.aws/knowledge-center/associate-acm-certificate-alb-nlb).

Answered By DevDude87 On

Have you confirmed which domain you specified when creating the ACM certificate? You need to access the application using that specific domain in your browser instead of the ALB's DNS name. For example, if your certificate is for 'example.com', you shouldn’t use the ALB’s IP address directly.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.