How does one point a domain to a load balancer that doesn't have a stable IP?
Solution 1:
You can use an Alias record like described in http://aws.amazon.com/route53/faqs/:
Additionally, Route 53 offers ‘Alias’ records (a Route 53-specific virtual record). Alias records are used to map resource record sets in your hosted zone to Elastic Load Balancing instances. Alias records work like a CNAME record in that you can map one DNS name (mydomain.com) to another ‘target’ DNS name (elb1234.elb.amazonaws.com). They differ from a CNAME record in that they are not visible to resolvers. Resolvers only see the A record and the resulting IP address of the target record.
Next you can cname the domain like domain.com to www.domain.com using a CNAME(after you've pointed it using the Alias record), like:
www.domain.com CNAME TO domain.com
Also please note that in order to do this you'll need to move your zone to route53 so to do the Alias record. Most of the DNS providers unfortunately don't offer the ability to make such records for the domain name.
Solution 2:
From the AWS info page on Elastic Load Balancing:
Traffic to the DNS name provided by the Elastic Load Balancer is automatically distributed across your load balanced, healthy Amazon EC2 instances.
So in essence, Amazon provides you with a DNS name to map your records to. This would be using a CNAME record as opposed to an A record. The DNS name of the load balancer should not change therefore you never have to deal with IPs which as you point out might change.
EDIT:
AWS has always supported direct CNAME links to subdomains and wildcard subdomains for a root domain with simply CNAME records. So essentially it looks something like:
www.mydomain.com -> my-aws-01-elb.aws.amazon.com
Then for your root level domain you have two options, either setup DNS forwarding with your DNS host provider so that mydomain.com -> www.mydomain.com
or utilize Amazon's Route 53 service to host your entire DNS zone and let them manage and setup the required records to get root-level domain support.
If you don't need root domain level support and using a subdomain such as sub.mydomain.com
or www.mydomain.com
then you can use simple CNAME records for everything.