25

AWS Elastic Beanstalk suggests to use url in the following format: http://{appname}.elasticbeanstalk.com/

But I need to change it to my own url, something like http://appname.com

How to do it?

Alexander G
  • 1,829
  • 3
  • 20
  • 30

2 Answers2

32

Note: I use Amazon Route53 for my domain.


I know this is old question but since I just done this process for one of my apps, I decided to share it here which may help others too. Here's the steps I've gone through

  1. Login to your AWS Account
  2. Go to your EC2 Panel and select your region
  3. Select Load Balancer from left navigation menu
  4. Found Load Balancer which related to your Beanstalk App
  5. In Description Tab grab Hosted Zone ID
  6. Open Route53 Panel
  7. Select your domain hosted zone
  8. Add A Record for .YOUR-DOMAIN.com
  9. Select Alias option to Yes
  10. Search for your Load Balancer related to you app
  11. Confirm it's Hosted Zone ID with what you grabbed in step 5
  12. Do steps 8-11 for www.YOUR-DOMAIN.com as well.

References

Qorbani
  • 5,286
  • 2
  • 33
  • 45
9

Use Amazon Route53. ELBs, including those generated with ElasticBeanstalk, are assigned CNAMEs. You can't just point your top-level domain at a CNAME, as it violates the RFC. You could point a CNAME record like http://www.appname.com at it, but that still won't respond at http://appname.com. It's an irritating problem; for example, consider this 7-page thread on the AWS forum.

The easiest solution is Route53. It uses special apex records to map TLDs to ELBs, thus avoiding the problem entirely. You can also use an EIP'd public instance to forward traffic to the ELB, although this raises scalability concerns.

Christopher
  • 36,834
  • 9
  • 72
  • 91