Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom URL in AWS Elastic Beanstalk

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 https://tarta.ai

How to do it?

like image 501
Alexander G Avatar asked Sep 05 '12 11:09

Alexander G


People also ask

How do I get the Elastic Beanstalk URL?

You can see URL of your environment's application with the current value of the CNAME in the environment overview page of the Elastic Beanstalk console. Choose the URL on the overview page, or choose Go to environment on the navigation pane, to navigate to your application's web page.

How do I host a website on AWS Elastic Beanstalk?

In your AWS console, go to Elastic Beanstalk. Click “Create New Application” at the top left corner of the console. Fill in the form and click “Create”. You will get redirected to the new application page.

How do I deploy Elastic Beanstalk configuration files to AWS?

To deploy configuration files to your environment, add the configuration files to a directory named .ebextensions at the root of your application bundle. Then, deploy the source code that includes these configuration files. 1. Allow incoming traffic on port 443 to the EC2 instance that your Elastic Beanstalk application is running on.

How do I customize my environment on Elastic Beanstalk?

To customize your environment, consider the following: Use the option_settings key to modify the environment configuration. You can choose from general options for all environments and platform-specific options. Note: Recommended values are applied when you create or update an environment on the Elastic Beanstalk API by a client.

What is a launch now url in Elastic Beanstalk?

A Launch Now URL gives Elastic Beanstalk the minimum information required to create an application: the application name, solution stack, instance type, and environment type. Elastic Beanstalk uses default values for other configuration details that are not explicitly specified in your custom Launch Now URL.

What is the default domain name for Elastic Beanstalk environment?

Your Elastic Beanstalk Environment's Domain Name. By default, your environment is available to users at a subdomain of elasticbeanstalk.com. When you create an environment, you can choose a hostname for your application. The subdomain and domain are autopopulated to region.elasticbeanstalk.com.


2 Answers

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

  • http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html

  • http://aws.typepad.com/aws/2011/05/moving-ahead-with-amazon-route-53.html

like image 169
Qorbani Avatar answered Oct 18 '22 01:10

Qorbani


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.

like image 24
Christopher Avatar answered Oct 18 '22 01:10

Christopher