0

We have a subdomain under our company domain for our application: myapp.company.com.

Few years ago the following setup was done

  • myapp.company.com points to an elastic IP (done by the company IT)
  • elastic IP targets an public internet facing EC2 instance

Now I'm trying to find a way to switch that setup so it make use of a classic load balancer.

I created an internet facing classic load balancer

  • is in the security group of the VPC in which the instance is
  • targets the instance which is currently reachable through the elastic ip

I'm able visit the web apps on the instance through the load balancer with the public ip defined in the network interface of the load balancer.

After that, I thought a hosted zone would do the trick of routing the calls to myapp.company.com to the load balancer.

So I created a hosted zone

  • domain name when creating the hosted zone: myapp.company.com
  • added an A record which has the load balancer's dns name as alias target

But the load balancer is not used.

Khh
  • 2,521
  • 1
  • 25
  • 42
  • 1
    Where was this part of initial setup done: "myapp.company.com points to an elastic IP"? – Dusan Bajic Nov 20 '19 at 08:38
  • I've updated the question; I'm currently try to figure out who has done that, someone in the company IT department – Khh Nov 20 '19 at 09:12

1 Answers1

2

If you are going to use Classic Load Balancer, you need to make a note of the string from ELB DNS name (for example, my-load-balancer-1234567890.us-west-2.elb.amazonaws.com). After that, ask your IT support to modify DNS record for myapp.company.com to CNAME which points to ELB:

myapp.company.com  CNAME  my-load-balancer-1234567890.us-west-2.elb.amazonaws.com

(creating the hosted zone in AWS Route53 will only work after someone (zone owner, so probably IT) delegates authority for your (sub)domain to your AWS name servers, and it is most probably not worth doing just for the sake of one record)

Dusan Bajic
  • 10,249
  • 3
  • 33
  • 43
  • I'm the owner of the hosted zone, but I will talk to the IT that they switch the cname entry to my ELB. – Khh Nov 20 '19 at 10:05