Having some fun with AWS Route53

Amazon Web Services Route53 is a high available and scalable DNS solution. It can be used to route request inside and outside amazon web services as well. Route53 allow you to configure DNS health checker to route traffic to a healthy endpoint.

Route53 has plenty of features, for me best ones are:

Traffic Flow: Route end user to best endpoints.
Latency Based Routing: Routes users to region with lowest latency.
GEO DNS: Route users based on they IP location.
Private DNS for Amazon VPC:  Manages custom domains internaly.
DNS Failover: Avoid outages routing users to different locations.

For this post i will show how to install and do some basic operations with  CLI53 a command line interface for Amazon Route53.  For this post we will use CentOS / Amazon Linux Distribution.


How to Install on CentOs?

sudo yum install -y bind-utils
pip install cli53

Figureout the box name?

/opt/aws/bin/ec2-metadata | grep 'public-hostname:' | cut -d ' ' -f 2

Commands

dig redhat.com
dig redhat.com +nocomments +noquestion +noauthority +noadditional +nostats
dig redhat.com +noall +answer
Queries
dig redhat.com NS +noall +answer
dig -t NS redhat.com +noall +answer
dig redhat.com +short
dig -x 209.132.183.81 +short

Register DNS

cli53 list
cli53 rrcreate "DNS_ZONE_ID" "NAME" CNAME "HOSTNAME.AWS_AZ.compute.amazonaws.com" --replace --ttl "60"
cli53 rrcreate "DNS_ZONE_ID" "NAME" TXT "1 2 3 4" --replace --ttl "60"
Resources
Cheers,
Diego Pacheco

Popular posts from this blog

Having fun with Zig Language

C Unit Testing with Check

Cool Retro Terminal