Amazon Route 53 is a highly available and scalable Domain Name System (DNS) service. Besides traffic management, Route 53 provides various features such as domain name registration, DNS routing policies and health checks.
Registering a domain
In the Route 53 console, select Registered domains in the navigation pane and click Register domains.
Enter a desired domain name and click Search. From the list of the available domains, choose one and click Select.
Select the duration and/or (un)check the Auto-renew option, and click Next.
Review the information, accept the terms and conditions, and click Submit.
Note: The registration can take up to 15 minutes. You may receive an email to verify your email address for the domain name, or the domain name will be suspended. If you receive an email about failing to register the domain name, create an Account and billing support case with service Domains and category Registration issue. The issue should be resolved in 2-3 days.
Creating records in Route 53 Hosted Zone
Select Hosted zones in the navigation pane and click the hosted zone created in the previous step.
Enter
www
as the subdomain, toggle on the switch for Alias, select Alias to Elastic Beanstalk environment, select the region of the environment, select the environment accordingly, keep other values default, and click Create records.
Updating the Django settings
-
Append the Route 53 domain name to the
ALLOWED_HOSTS
list in the file namedsettings.py
in theebdjango
directory, and save the file.ALLOWED_HOSTS = [ "djangoproj-dev.eba-ttkddb9r.us-east-1.elasticbeanstalk.com", "www.elasticbeanstalkapp.com", ]
-
Re-deploy the Django site.
eb deploy
After the environment update completes, the Django site is updated. At this stage, navigating to either the Elastic Beanstalk domain name (i.e. http://djangoproj-dev.eba-ttkddb9r.us-east-1.elasticbeanstalk.com
) or the Route 53 domain name (i.e. http://www.elasticbeanstalkapp.com
) gets the same Django site.
Top comments (0)