<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John Stilia</title>
    <description>The latest articles on DEV Community by John Stilia (@stiliajohny).</description>
    <link>https://dev.to/stiliajohny</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F615279%2Ffc95939d-81be-47de-b234-e614364fbea5.png</url>
      <title>DEV Community: John Stilia</title>
      <link>https://dev.to/stiliajohny</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stiliajohny"/>
    <language>en</language>
    <item>
      <title>AWS Route53 Health Check Monitoring John Stilia included in AWS Terraform</title>
      <dc:creator>John Stilia</dc:creator>
      <pubDate>Tue, 11 Oct 2022 22:26:01 +0000</pubDate>
      <link>https://dev.to/stiliajohny/aws-route53-health-check-monitoringjohn-stilia-included-in-aws-terraform-3l0m</link>
      <guid>https://dev.to/stiliajohny/aws-route53-health-check-monitoringjohn-stilia-included-in-aws-terraform-3l0m</guid>
      <description>&lt;h2&gt;
  
  
  What AWS resources are we using?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks.html"&gt;Route53 Health Check&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html"&gt;CloudWatch Alarm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/sns/latest/dg/welcome.html"&gt;SNS Topic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/sns/latest/dg/sns-subscription-filter-policies.html"&gt;SNS Subscription&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is the problem we are trying to solve?
&lt;/h2&gt;

&lt;p&gt;We want to be notified when a Route53 Health Check fails. If an endpoint is not available or is not responding, we want to know about it. We can use CloudWatch to monitor the health check and send an SNS notification when the health check fails.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do we solve the problem?
&lt;/h2&gt;

&lt;p&gt;We will use Terraform to create the resources we need. We will create a Route53 Health Check, a CloudWatch Alarm, an SNS Topic, and an SNS Subscription. We will use the Route53 Health Check to monitor the health of the endpoint. We will use the CloudWatch Alarm to monitor the Route53 Health Check. We will use the SNS Topic to send the notification. We will use the SNS Subscription to subscribe to the SNS Topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things to note
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The CloudWatch Alarm will send a notification to the SNS Topic when the Route53 Health Check fails.&lt;/li&gt;
&lt;li&gt;The SNS Subscription will subscribe to the SNS Topic and send the notification to the email address specified in the SNS Subscription.&lt;/li&gt;
&lt;li&gt;The SNS Subscription will only send the notification if the SNS Topic sends a notification with the subject "ALARM: ".&lt;/li&gt;
&lt;li&gt;The SNS subscription will only send notifications if the email recepient is subscribed to the SNS Topic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is the Terraform code?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cloudwatch alarm for the health check&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_cloudwatch_metric_alarm"&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw_blog"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;alarm_name&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw.blog"&lt;/span&gt;
  &lt;span class="nx"&gt;comparison_operator&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"LessThanThreshold"&lt;/span&gt;
  &lt;span class="nx"&gt;evaluation_periods&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"2"&lt;/span&gt;
  &lt;span class="nx"&gt;metric_name&lt;/span&gt;         &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"HealthCheckStatus"&lt;/span&gt;
  &lt;span class="nx"&gt;namespace&lt;/span&gt;           &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"AWS/Route53"&lt;/span&gt;
  &lt;span class="nx"&gt;period&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"60"&lt;/span&gt;
  &lt;span class="nx"&gt;statistic&lt;/span&gt;           &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Minimum"&lt;/span&gt;
  &lt;span class="nx"&gt;threshold&lt;/span&gt;           &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"1"&lt;/span&gt;

  &lt;span class="nx"&gt;dimensions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;HealthCheckId&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_route53_health_check&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;iusearchbtw_blog&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;alarm_description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"This metric monitors status of the health check iusearchbtw.blog"&lt;/span&gt;
  &lt;span class="nx"&gt;alarm_actions&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;aws_sns_topic&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;iusearchbtw_blog&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;arn&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;creation&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"terraform-cloud"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Route53 health check&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_route53_health_check"&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw_blog"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;fqdn&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw.blog"&lt;/span&gt;
  &lt;span class="nx"&gt;port&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt;
  &lt;span class="nx"&gt;type&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"HTTPS"&lt;/span&gt;
  &lt;span class="nx"&gt;resource_path&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"/"&lt;/span&gt;
  &lt;span class="nx"&gt;failure_threshold&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"5"&lt;/span&gt;
  &lt;span class="nx"&gt;request_interval&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"30"&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;creation&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"terraform-cloud"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SNS topic&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_sns_topic"&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw_blog"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw_blog"&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;creation&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"terraform-cloud"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SNS subscription&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_sns_topic_subscription"&lt;/span&gt; &lt;span class="s2"&gt;"iusearchbtw_blog"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;topic_arn&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_sns_topic&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;iusearchbtw_blog&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;arn&lt;/span&gt;
  &lt;span class="nx"&gt;protocol&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"email"&lt;/span&gt;
  &lt;span class="nx"&gt;endpoint&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"stilia.johny@gmail.com"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AWS

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks.html"&gt;Route53 Health Check&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html"&gt;CloudWatch Alarm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/sns/latest/dg/welcome.html"&gt;SNS Topic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/sns/latest/dg/sns-subscription-filter-policies.html"&gt;SNS Subscription&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Terraform

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm"&gt;aws_cloudwatch_metric_alarm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_health_check"&gt;aws_route53_health_check&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic"&gt;aws_sns_topic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic_subscription"&gt;aws_sns_topic_subscription&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>observability</category>
    </item>
    <item>
      <title>Use AWS as DNS instead of your Domain Registrar (in simple steps).</title>
      <dc:creator>John Stilia</dc:creator>
      <pubDate>Mon, 12 Sep 2022 10:56:25 +0000</pubDate>
      <link>https://dev.to/stiliajohny/use-aws-as-dns-instead-of-your-domain-registrar-in-simple-steps-8cn</link>
      <guid>https://dev.to/stiliajohny/use-aws-as-dns-instead-of-your-domain-registrar-in-simple-steps-8cn</guid>
      <description>&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Most Domain Providers do not offer a programmatic approach to updating DNS records.&lt;br&gt;
If you have already purchased a domain outside AWS and you cannot transfer it but you want to control the DNS records programmatically, this article is for you&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AWS Route 53 Preparation
&lt;/h3&gt;

&lt;p&gt;First login to &lt;strong&gt;AWS&lt;/strong&gt; and head to &lt;strong&gt;Route53&lt;/strong&gt;.&lt;br&gt;
There you will see a &lt;strong&gt;Hosted Zones&lt;/strong&gt; section. Click on &lt;strong&gt;Create Hosted Zone&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QdhCNBqr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/create-hosted-zone.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QdhCNBqr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/create-hosted-zone.png" alt="Create Hosted Zone" width="880" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the Zone is created, you will see a &lt;strong&gt;NS&lt;/strong&gt; record. This is the &lt;strong&gt;Nameserver&lt;/strong&gt; record that you will need to update your domain provider with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yq1AQNH---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/dns-records.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yq1AQNH---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/dns-records.png" alt="DNS Records" width="880" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; A hosted zone acts as a domain manager for your domain&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Domain Provider Preparation
&lt;/h3&gt;

&lt;p&gt;Login to your &lt;strong&gt;Domain Provider&lt;/strong&gt; and head to the &lt;strong&gt;DNS&lt;/strong&gt; section.&lt;br&gt;
There you will see a &lt;strong&gt;Nameservers&lt;/strong&gt; section. Click on &lt;strong&gt;Manage Nameservers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;By default, the &lt;strong&gt;Domain Provider&lt;/strong&gt; will have a set of nameservers for your domain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--npyKr-7i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/domain-registar-nsrecord.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--npyKr-7i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://iusearchbtw.blog/2022/09/aws-route53-dns/domain-registar-nsrecord.png" alt="Domain Nameservers" width="880" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; A nameserver is a server that stores the DNS records for a domain, like an IP address, for example.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to check if it's working?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The CLI Way
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; dig ns iusearchbtw.blog

&lt;span class="p"&gt;;&lt;/span&gt; &amp;lt;&amp;lt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; DiG 9.18.6 &amp;lt;&amp;lt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ns iusearchbtw.blog
&lt;span class="p"&gt;;;&lt;/span&gt; global options: +cmd
&lt;span class="p"&gt;;;&lt;/span&gt; Got answer:
&lt;span class="p"&gt;;;&lt;/span&gt; -&amp;gt;&amp;gt;HEADER&lt;span class="o"&gt;&amp;lt;&amp;lt;-&lt;/span&gt; &lt;span class="no"&gt;opcode&lt;/span&gt;&lt;span class="sh"&gt;: QUERY, status: NOERROR, id: 61482
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;iusearchbtw.blog.    IN  NS

;; ANSWER SECTION:
iusearchbtw.blog. 21600 IN  NS  ns-1210.awsdns-23.org.
iusearchbtw.blog. 21600 IN  NS  ns-1878.awsdns-42.co.uk.
iusearchbtw.blog. 21600 IN  NS  ns-396.awsdns-49.com.
iusearchbtw.blog. 21600 IN  NS  ns-825.awsdns-39.net.

;; Query time: 43 msec
;; SERVER: 192.168.1.107#53(192.168.1.107) (UDP)
;; WHEN: Sun Sep 11 19:55:18 BST 2022
;; MSG SIZE  rcvd: 185

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Online Way
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dnschecker.org/ns-lookup.php"&gt;https://dnschecker.org/ns-lookup.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.whatsmydns.net/dns-lookup/ns-records?query=iusearchbtw.blog&amp;amp;server=google"&gt;https://www.whatsmydns.net/dns-lookup/ns-records?query=iusearchbtw.blog&amp;amp;server=google&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mxtoolbox.com/SuperTool.aspx?action=dns%3aiusearchbtw.blog&amp;amp;run=toolpage"&gt;https://mxtoolbox.com/SuperTool.aspx?action=dns%3aiusearchbtw.blog&amp;amp;run=toolpage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Risks
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Order of execution
&lt;/h3&gt;

&lt;p&gt;Ensure your DNS records are set correctly before you update your nameservers.&lt;br&gt;
This will ensure that your domain is not down for some time.&lt;/p&gt;

&lt;h3&gt;
  
  
  DNS Propagation
&lt;/h3&gt;

&lt;p&gt;While setting up new DNS records, it can take up to 24 hours for the changes to propagate. This is because DNS records are cached by your ISP and other DNS servers.&lt;br&gt;
Setting a low TTL (Time To Live) can help with this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Static vs Dynamic websites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On a site with static content, this is relatively easy - have the identical site on both old and new locations during the changeover period. A gotcha to be aware of is HTTPS/SSL certificates - particularly if running something like certbot you will need to ensure certificate validity on both systems during the changeover window.&lt;/li&gt;
&lt;li&gt;On a dynamic site, this is a LOT harder. Depending on how you handle sessions, you may be able to rig up some kind of replication or take the view that you can disconnect everyone as long as they can immediately reconnect (or some other solution). The trick here is to use a reverse proxy/load balancer. There are different ways to do this - one might be to migrate the site to a preconfigured load balancer, point the load balancer to new IP, update DNS again, and remove the load balancer. There are plenty of variations on the theme, including turning the old system into a reverse proxy for the new system in the interim.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;An important aside - if a short period of downtime for current users is OK, you can reduce TTLs in DNS to 60 seconds (lower is not a good idea) - in that way, the vast majority of users will be switched from old to a new server in a minute or 2.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.virtuallyboring.com/migrate-godaddy-domain-and-dns-to-aws-route-53/"&gt;https://www.virtuallyboring.com/migrate-godaddy-domain-and-dns-to-aws-route-53/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.html"&gt;https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/migrate-dns-domain-in-use.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html"&gt;https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>domain</category>
      <category>dns</category>
    </item>
  </channel>
</rss>
