Reputation: 18610
My website is setup on ECS behind a load balancer. I want my A Record to point to the load balancer, but Elastic Load Balancer's can't have static/elastic IP's assigned to them.
The DNS of a load balancer may be something like my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com
, and you can point a CNAME to it but not an A Record.
(We need an A Record to make MX records work properly, otherwise I would just use a CNAME).
Our domain name is hosted outside of AWS (i.e. not on Route53).
A very clunky and non-scalable way to handle this would be to setup a webserver (NGINX, IIS, etc) with an Elastic IP and simply have that redirect to the www version of my site, which uses a CNAME to point to the load balancer.
This is something I really want to avoid, for maintainability reasons and for scalability.
What is the quickest and most straight forward way to either point an A record to an ELB, or re-route an income request from an IP (mysite.com) to something else (www.mysite.com).
Extra
Here's a similar question, but dated. One answer say's it's not possible, and the other answer seems dated, and I don't believe is relevant.
Upvotes: 0
Views: 73
Reputation: 66
You need to have your domain name hosted in Route 53 in order to have an A record pointing to the ELB.
Here's a blog post on how to use a static ip in application load balancer, but its not very straight forward.
You could also have a look at the classic load balancer, prett ysure that you can use elastic IPs with that one.
Upvotes: 0