We already created a EC2 server setup and tried few routing policies. We deleted those A records. We will create one with failover policy now. We will also need to create health check within route 53 for this. This policy lets you chose where traffic will be sent based on geographical location of users.
Steps:
-
Copy your ELB dns address and go back to Route 53
-
Go to Healthchecks and click on Create Health Check.
-
Give any name, keep what to monitor option as Endpoint, select specify endpoint by domain name, add the ELB dns in the domain name section.
-
In Advanced Configuration, select request interval option as Fast and failure threshold as 1. Click Next.
-
Leave Create Alarm option as no, and click create.
-
Now create a Health check configuration for the entire domain name (e.g. buddytutor.com) than dns. Everything else remains the same in first page. Click Next.
-
Select create alarm as yes. Select New SNS topic. Give a name and email. Click create.
-
Go inside the hosted zone for our domain. Click on the domain to see current records. NS and SOA records should be already created as default.
-
Click on create record set.
-
Leave the name as blank to denote naked domain name.
-
Select the record type as A – Ipv4 Address
-
Click yes for Alias (as we are configuring for a naked domain name).
-
Click inside Alias target and select the ELB that is in the closer region. Remember that we have two ELBs, one in closer region and one in faster region.
-
Select the routing policy as Geolocation
-
Select the continent in which your closer region is part of. Leave other options as is and click create.
-
Create another record for farther site, with policy as Geolocation and location as Default (Default means everything else).
-
Try running the domain url in the browser. It should go to primary site within your continent. You may also use a vpn to login to your far away region (or any other continent than the primary as we have selected default) and may try running the domain url again. It should now go to the secondary site.
-
Cleanup all ELBs and EC2 instances. Otherwise you may incur costs.
Exam Tip
-
You should chose ALIAS record over CNAME in most cases when working with AWS.
- heartin's blog
- Log in or register to post comments
Recent comments