Monitoring the availability of the primary service can be done in the form of health checks. When a downtime condition happens, it will trigger failover; in this case, a DNS failover is used via Route 53 HTTP health checks, and a Failover Routing Policy is configuring the on-premises side as Primary and the cloud environment as Secondary to fail over the AWS cloud.