We will create an EC2 server setup and configure and use simple routing policy in first part of this lab. For continuity and incurring less cost, it is better you do all the five parts of this lab together.
Steps:
-
Login to AWS console and go to Route 53.
-
Go to Registered Domains under Domains. You might have to click on get started if you are logging in for the first time.
-
You can click on Register Domain to check for availability, price and register a domain. You can also transfer a domain you have already registered with another domain registrar. You may skip this step if you do not want to buy or transfer a domain. We also recommend not using your production domain for this exercise.
-
AWS will create a hosted zone for your domain. Go inside it and verify the DNS records already added for you. NS and SOA records should be already created.
-
Go to EC2
-
Provision two instances in a region near you. Create a bootstrap script as before to start apache server and keep it running. Also remember to create an index.html files with slightly different text to identify the server instance. When you select security group, make sure ssh and http are open to the world.
-
Create a new classic ELB. Put in same security group as EC2 instances. Add both instances we had created to the ELB. Verify the setup by running individual IPs and ELB dns.
-
Create an EC2 instance and a classic ELB in a region as far as possible from current location. Create a bootstrap script as before to start apache server and keep it running. Create an index.html files with slightly different text to identify the server instance. You might have to create a new security group. Make sure ssh and http are open to the world. Verify the setup by running instance IP and ELB dns. Make sure you are looking at correct ELB based on region selected.
-
Go back to Route 53 and 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 Simple.
-
Click create and verify the new A record details in the records page.
-
Verify running the domain url (e.g. buddytutor.com) in the browser to see our index.html files from one of the instances.
-
Delete the A record that we just created. You do not have to cleanup everything yet, as we will be doing further labs in continuation.
References (Deprecated):
- heartin's blog
- Log in or register to post comments
Recent comments