How to map your custom domain name to an AWS EC2 instance.
Because the IP address of an instance is not fixed (if you use a load balancer) you should not map your instance IP address directly into a DNS 'A' record. There is hopefully a workaround to this issue.
The first step is to find your environment URL in the Elastic beanstalk console:
Login to your Amazon Console
Then Navigate to the :
Now write :
And finally go to your , delete any A records you may have configured and add the following record to your DNS setting:
Wait a couple a minutes and try accessing your website using your custom domain.
Note: Don't forget to redirect (or make an alias) to the 'www' version of your domain (you might also be interested in how to):