Skip to content

Route my API deployed in Ec2 with SSL using AWS ELB to subdomain hosted in hostinger

0

Hi, I have a subdomain dev.mywebsite.com hosted in hostinger. I need to use this subdomain to access my web API deployed in a EC2 instance with SSL enabled. I would like to use ELB for routing and certificate manager to generate SSL certificate for my subdomain dev.mywebsite.com. Please assist!

1 Answer
0

How's it going Melth?

I see you posted this a few hours ago, have you gotten any closer to resolving?

The way I would approach this problem is by first generating an SSL cert using AWS ACM (Certificate Manager) to create and validate said SSL certificate for your domain.

Next I would create an ELB making sure it is 'internet-facing' and then select the appropriate VPC and subnets where your ec2 is deployed. Next, add a HTTPS listener and choose the SSL certificate you created in ACM. Then create a security group for your port and a target group for your instance. Make your target group register with you ec2 instance.

Then finally, configure your DNS settings in Hostinger by modifying the A record. Make it point to the public IP address of your ELB. If you don't like static IPs, use a CNAME record. Wait for the DNS propagation and then try and access. It should route traffic through the ELB to your instance.

Good luck

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.