PRACTCAL

1. Create a WordPress

Create an ec2 instance with WordPress -> attach an
elastic ip-> login to website -> add a file from s3 -> check
whether the website is working or not.

2. Login to freenom

Goto freenom -> check whether the name is available or
not -> check the available name -> select -> continue ->
login using google, facebook or live > compete the form

3. Route 53

Go to Route53 -> DNS management -> create hosted zone
-> domain name (nirmal.ga, give the domain name from
freenom that you have created) -> type (public hosted
zone) -> create.
  • A hosted zone is a collection of resource record sets for a specified domain.

  • A resource record is an entry in DNS zone that specifies information about a particular name or object in the zone.

4. Go to freenom

Go to freenom -> service -> my domain -> manage domain
-> management tools -> name server -> use custom name
server -> copy the values from hosted zone -> paste it to
name server -> change name ser

(note: it may take a while to for the domain name provider to map the AWS name server with the domain name.)

5. Configuring domain Record Set

Select the hosted zone -> create record set -> name
(www) -> value (elastic ip or ip of the instance) -> create.
Resource set tell the DNS how to how you want
traffic to be routed for that domain.

(note: here if you click on alias -> yes, we can see alias target there we can specify S3, ELB, CloudFront et

Routing Policy determines how Amazon Route 53 responds to queries.

  1. Simple Routing Policy: it is used when we have a single resource that performs a given function for your domain

  2. Weighted Routing Policy: it is used when you have multiple resources that perform the same function.

  3. Latency Routing Policy: it is used when we have resources in multiple Amazon EC2 data centers that perform the same function and you want Amazon Route 53 to respond to DNS queries with the resources that provide the best latency.

  4. Failover Routing Policy: it is used when we want to configure active-passive failover, in which one resource takes all traffic when it's available and the other resource takes all traffic when the first resource isn't available.

  5. Geolocation Routing Policy: it is used when we want Amazon Route 53 to respond to DNS queries based on the location of your users.

6. Verify the web page

Open a tab -> www.nirmal.ga

7. Health Check

  • Route 53 health checks monitorthe health and performance of your application's servers, or endpoints, from a network of health checkers in locations around the world.

  • we can specify either a domain name or an IP address and a port to create HTTP, HTTPS, and TCP health checks that check the health of the endpoint.

  • we can use Route 53 health checks for monitoring and alerts. Each health check provides CloudWatch metrics that you can view and set alarms on.

  • We can also use Route 53 health checks for DNS failover by associating health checks with any Route 53 DNS resource record set. This lets you route requests based on the health of your endpoints.

(note: here we are going to create health check with routing policy failover).

1. Create instance

Create 2 instance with httpd web server
-> one in Mumbai (Health Check 1,
content) and other in different region
(Singapore, Health Check 2, content).

2. Create health check

Go to health check -> create health
check -> name
(regionalhealthcheck) ->specific endpoint
(ip) -> protocol (http) -> ip addrs (ip of the 1
st
instance, mumbai) -> hostname (webprimary)
-> port (80) -> path (index.html) -> next ->
cloudwatch (yes) -> create a topic -> create.

3. Create a primary record set

Go to hosted zone -> create a record set
-> name (www2) -> TTL (1m) -> value (ip of 1
st
instance) -> routing policy (Failover) ->
Failover record type (primary) -> set ID (www2
-primary, created by default) -> Associate with
health check (yes) -> Health check to
associate (regionalhealthcheck, one which we
create previously) -> save record set.

(note: after 5 minute’s check www2.nirmal.ga, it will display “Health Check 1”)

Go to hosted zone -> create a record set
-> name (www2) -> TTL (1m) -> value (ip of 2
nd
instance) -> routing policy (Failover) ->
Failover record type (secondary) -> set ID
(www2-Secondary, created by default) ->
Associate with health check (no) -> save
record set.

(note: stop the 1 st instance after 5 minute’s checks www2.nirmal.ga, it will display “Health Check 2”).

Last updated