I just started playing around with AWS. I have a domain name that is served by Webfaction. I wanted to create a subdomain and point it at my AWS EC2 instance. Seems like it should be pretty easy. But the time it takes for domain name propagation makes makes it hard to debug.
The first thing to note is the command:
lets you know if propagation has been done.
The first approach I tried was to set the CNAME for the subdomain using the Webfaction control panel. The was super easy, but it did not work. It appears AWS will not allow that. For more info, see here.
The other approach is to create a static site on Webfaction and use .htaccess to redirect. Something like this. One advantage of this approach is once the domain name has propogated, you do not need to wait for it to re-propagate if you change .htaccess.
If you get a 500 error, you can inspect the Webfaction logs to find out what went wrong. The log you want is ~/logs/apache/error_my_app_php.log.
Here is the htaccess file that worked for me:
Redirect permanent / http://ec2-xx-xx-x-xxx.compute-1.amazonaws.com order deny,allow