Relative Content

Tag Archive for amazon-web-servicesdnscloudflarecname

How do I control the FQDN for my AWS load balancer?

When I create a load balancer in AWS it gets allocated a DNS name (A-record) {name-provided}-971871181.ap-southeast-2.elb.amazonaws.com. The problem is I don’t seem to have any control over the -971871181 part (which changes each time), nor can I see how to create a CNAME record in ap-southeast-2.elb.amazonaws.com (or anywhere else under an AWS domain) to point to it (Hosted Zones do not work, even though AWS gives the impression they do). But I need to be able to repeatedly tear down and re-deploy this load balancer such that it always has the same/known domain name, as I intend to use CloudFlare in front of it. CloudFlare will be configured with a CNAME record to point to the *.ap-southeast-2.elb.amazonaws.com name, but I can’t programmatically change that each time I re-deploy.
Surely this should be possible?