Amazon Route 53
Developer Guide (API Version 2013-04-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Creating, Updating, and Deleting Health Checks

The following procedures explain how to create, update, and delete Amazon Route 53 health checks. If you're updating or deleting health checks that are associated with resource record sets, review the tasks in Considerations When Updating or Deleting Health Checks. If not, you can skip to the applicable topic.

Considerations When Updating or Deleting Health Checks

When you want to update or delete health checks that are associated with resource record sets, or you want to change resource record sets that have associated health checks, you must consider how your changes affect routing of DNS queries and your DNS failover configuration.

Caution

Amazon Route 53 does not prevent you from deleting a health check even if the health check is associated with one or more resource record sets. If you delete a health check and you don't update the associated resource record sets, the future status of the health check cannot be predicted and might change. This will affect the routing of DNS queries for your DNS failover configuration.

To update or delete health checks that are already associated with resource record sets, we recommend that you perform the following tasks:

  1. Identify the resource record sets that are associated with the health checks. To identify the resource record sets that are associated with a health check, you must do one of the following:

    • Review the resource record sets in each hosted zone using the Amazon Route 53 console. For more information, see Listing Resource Record Sets.

    • Run the GET ListResourceRecordSets API action on each hosted zone and review the response. For more information, see GET ListResourceRecordSets in the Amazon Route 53 API Reference.

  2. Assess the change in behavior that will result from updating or deleting health checks, or from updating resource record sets, and determine which changes to make. For more information, see the following topics:

  3. Change health checks and resource record sets as applicable. For more information, see the following topics:

  4. Delete the health checks that you're no longer using, if any. For more information about deleting health checks using the console, see Deleting Health Checks. For information about using the Amazon Route 53 API, see DELETE DeleteHealthCheck in the Amazon Route 53 API Reference.

Creating and Updating Health Checks

The following procedure describes how to create and update health checks using the Amazon Route 53 console.

For information about creating health checks using the API, see POST CreateHealthCheck in the Amazon Route 53 API Reference. For information about updating health checks using the API, see POST UpdateHealthCheck, also in the Amazon Route 53 API Reference.

To create or update a health check using the Amazon Route 53 console

  1. If you're updating health checks that are associated with resource record sets, perform the recommended tasks in Considerations When Updating or Deleting Health Checks.

  2. Sign in to the AWS Management Console and open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.

  3. In the navigation pane, click Health Checks.

  4. If you want to update an existing health check, select the health check and click Edit Health Check.

    If you want to create a health check, click Create Health Check. For more information about each setting, move the mouse pointer over a label to see its tool tip.

  5. Enter the applicable values. Note that some values can't be changed after you create a health check. For more information, see Values that You Specify When You Create or Update Health Checks.

  6. Click Create Health Check.

  7. Associate the health check with one or more Amazon Route 53 resource record sets. For information about creating and updating resource record sets, see Working with Resource Record Sets.

Values that You Specify When You Create or Update Health Checks

When you create or update health checks in the Amazon Route 53 console, you specify values in the Create Health Check dialog box (see below) or the Update Health Check dialog box, which is almost identical.

Creating a health check

When you create or update health checks, specify the applicable values:

Name

Optional: The name that you want to assign to the health check. If you specify a value for Name, Amazon Route 53 adds a cost allocation tag to the health check, assigns the value Name to the tag key, and assigns the value that you specify to the tag value.

For more information about tagging and health checks, see Naming Health Checks and Tagging Them for Cost Allocation.

Protocol

The method that you want Amazon Route 53 to use to check the health of your endpoint:

  • HTTP and HTTPS: Amazon Route 53 tries to establish a TCP connection and waits for an HTTP status code of 200 or greater and less than 400.

  • TCP: Amazon Route 53 tries to establish a TCP connection.

For more information, see How Amazon Route 53 Determines Whether an Endpoint Is Healthy.

After you create a health check, you can't change the value of Protocol.

Specify Endpoint By

Whether you want to use an IP address or a domain name to specify the endpoint whose health you want to check.

After you create a health check, you can't change the value of Specify Endpoint By.

IP Address

The IPv4 address of the endpoint on which you want Amazon Route 53 to perform health checks, if you choose Specify Endpoint by IP Address.

Amazon Route 53 cannot check the health of endpoints for which the IP address is in local, private, nonroutable, or multicast ranges. For more information about IP addresses for which you cannot create health checks, see RFC 5735, Special Use IPv4 Addresses and RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space.

If the endpoint is an Amazon EC2 instance, we recommend that you create an Elastic IP address, associate it with your Amazon EC2 instance, and specify the Elastic IP address for IP Address. This ensures that the IP address of your instance will never change. For more information, see Elastic IP Addresses (EIP) in the Amazon EC2 User Guide for Linux Instances.

Port

The port on the endpoint on which you want Amazon Route 53 to perform health checks.

Host Name (Specify Endpoint by IP Address; HTTP and HTTPS Only)

Note

When you choose to specify the endpoint by IP address, this setting is labeled Host Name. When you choose to specify the endpoint by domain name, this setting is labeled Domain Name.

The value that you want Amazon Route 53 to pass in the Host header in HTTP and HTTPS health checks. This is typically the fully qualified DNS name of the website on which you want Amazon Route 53 to perform health checks. When Amazon Route 53 checks the health of an endpoint, here is how it constructs the Host header:

  • If you specify a value of 80 for Port and HTTP for Protocol, Amazon Route 53 passes to the endpoint a Host header that contains the value of Host Name.

  • If you specify a value of 443 for Port and HTTPS for Protocol, Amazon Route 53 passes to the endpoint a Host header that contains the value of Host Name.

  • If you specify another value for Port and either HTTP or HTTPS for Protocol, Amazon Route 53 passes to the endpoint a Host header that contains the value Host Name:Port.

If you choose to specify the endpoint by IP address and you don't specify a value for Host Name, Amazon Route 53 substitutes the value of IP Address in the Host header in each of the preceding cases.

Domain Name (Specify Endpoint by Domain Name, All Protocols)

The domain name of the endpoint on which you want Amazon Route 53 to perform health checks, if you choose Specify Endpoint by Domain Name.

If you choose to specify the endpoint by domain name, Amazon Route 53 sends a DNS request to resolve the domain name that you specify in Domain Name at the interval you specify in Request Interval. Using an IP address that DNS returns, Amazon Route 53 then checks the health of the endpoint.

If you want to check the health of weighted, latency, geolocation routing, or failover resource record sets, and you choose to specify the endpoint by domain name, we recommend that you create a separate health check for each endpoint. For example, create a health check for each HTTP server that is serving content for www.example.com. For the value of Domain Name, specify the domain name of the server (such as us-east-1-www.example.com), not the name of the resource record sets (www.example.com).

Important

In this configuration, if you create a health check for which the value of Domain Name matches the name of the resource record sets and then associate the health check with those resource record sets, health check results will be unpredictable.

In addition, if the value of Protocol is HTTP or HTTPS, Amazon Route 53 passes the value of Domain Name in the Host header as described in Host Name, earlier in this list. If the value of Protocol is TCP, Amazon Route 53 doesn't pass a Host header.

Path (HTTP and HTTPS Only)

The path that you want Amazon Route 53 to request when performing health checks. The path can be any value for which your endpoint will return an HTTP status code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html. Amazon Route 53 automatically adds a leading / character.

Request Interval

The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request. Every Amazon Route 53 health checker makes requests at this interval.

After you create a health check, you can't change the value of Request Interval.

Failure Threshold

The number of consecutive health checks that an endpoint must pass or fail for Amazon Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. For more information, see How Amazon Route 53 Determines Whether an Endpoint Is Healthy.

Enable String Matching (HTTP and HTTPS Only)

Whether you want Amazon Route 53 to determine the health of an endpoint by establishing a TCP connection and searching the response body for a specified string. If the response body contains the value that you specify in Search String, Amazon Route 53 considers the endpoint healthy. If not, or if the endpoint doesn't respond, Amazon Route 53 considers the endpoint unhealthy. The search string must appear entirely within the first 5,120 bytes of the response body.

After you create a health check, you can't change the value of Enable String Matching.

Search String (Only When String Matching Is Enabled)

The string that you want Amazon Route 53 to search for in the body of the response from your endpoint. The maximum length is 255 characters.

In addition, the Create Health Check page displays the following values based on the values that you entered:

URL

Either the full URL (for HTTP or HTTPS health checks) or the IP address and port (for TCP health checks) to which Amazon Route 53 will send requests when performing health checks.

Health Check Type

Either Basic or Basic + additional options based on the settings that you specified for this health check. For information about pricing for the additional options, see Amazon Route 53 Pricing.

Deleting Health Checks

To delete health checks, perform the following procedure.

To delete a health check using the Amazon Route 53 console

  1. If you're deleting health checks that are associated with resource record sets, perform the recommended tasks in Considerations When Updating or Deleting Health Checks.

  2. Sign in to the AWS Management Console and open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.

  3. In the navigation pane, click Health Checks.

  4. In the right pane, select the health check that you want to delete.

  5. Click Delete Health Check.

  6. Click Yes, Delete to confirm.