2026/11/20 - Amazon Route 53 - 4 new 8 updated api methods
Changes Amazon Route 53 support for advanced hosted zones. Including change guardrails, public dns fallback, change history. Also support for AZAffinityRouting.
Changes the tier of a hosted zone. The tier determines which features the hosted zone includes and which optional features you can turn on. For pricing information, see Amazon Route 53 pricing on the AWS website.
When the hosted zone moves to a new tier, Route 53 turns on the features that the new tier includes. Route 53 also disables any enabled features that the new tier doesn't include.
Before you move a hosted zone to a tier that doesn't offer an optional feature that you turned on, turn off that feature. You can't change the tier of a hosted zone that uses a CloudFront flat-rate pricing plan.
See also: AWS API Documentation
Request Syntax
client.update_hosted_zone_tier(
HostedZoneId='string',
HostedZoneTier='STANDARD'|'ADVANCED',
DryRun=True|False
)
string
[REQUIRED]
Specify the ID of the hosted zone whose tier you want to change.
string
[REQUIRED]
Specify the tier to move the hosted zone to. Valid values are the following:
STANDARD: The default tier for new hosted zones.
ADVANCED: A tier that includes Change History and offers more optional features.
boolean
Specifies whether to validate the request without changing the tier. Route 53 returns the same errors as for a real request, but doesn't change the hosted zone. The default is false.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the change batches in an Amazon Route 53 hosted zone. For each change batch, the response contains its change ID, the operation that submitted it, and when and by whom it was submitted. It also contains the request ID, the comment if there is one, and the number of changes. Use this list to review who changed the hosted zone and when.
Each change batch records one ChangeResourceRecordSets or CreateHostedZone request. A CreateHostedZone change batch has a ChangeCount of 0.
You can read a change batch for 365 days after it was submitted, but not from before the RetentionStartsAt time that GetHostedZone returns in Features/ChangeHistory. If Change History isn't turned on for the hosted zone, Route 53 returns a FeatureNotEnabled error.
Results are paginated. To get the next page, use the NextToken value from the response. To get the changes in a change batch, use GetHostedZoneChangeBatch.
See also: AWS API Documentation
Request Syntax
client.list_hosted_zone_change_batches(
HostedZoneId='string',
SubmittedAfter='string',
SubmittedBefore='string',
StartAfterChangeId='string',
SortOrder='ASCENDING'|'DESCENDING',
MaxResults='string',
NextToken='string'
)
string
[REQUIRED]
The ID of the hosted zone that you want to list change batches for.
string
The start of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-01T00:00:00Z or 2026-12-01T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range includes SubmittedAfter.
If you don't specify a value, the range starts at RetentionStartsAt. If you specify a value that's earlier than RetentionStartsAt, Route 53 returns an InvalidInput error that includes the earliest time that you can specify.
Because submit times can be slightly out of order, a returned SubmittedAt can fall just outside the range that you requested.
string
The end of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-02T00:00:00Z or 2026-12-02T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range excludes SubmittedBefore. The value must be at least one millisecond later than SubmittedAfter, or later than RetentionStartsAt if you omit SubmittedAfter.
If the range ends within a few seconds of the current time, a later request for the same range might return more change batches.
string
Returns the change batches after the specified change batch, not including it. Use this to read new change batches since the last change batch that you processed.
If you specify StartAfterChangeId, you must also specify SortOrder ASCENDING, and you can't specify SubmittedAfter or SubmittedBefore. If the change batch has expired, is from before RetentionStartsAt, or isn't in the hosted zone, Route 53 returns an InvalidInput error.
string
The order in which you want Route 53 to return change batches. Valid values:
DESCENDING – Newest first. This is the default.
ASCENDING – Oldest first.
string
The maximum number of change batches that you want Route 53 to return in this response. Specify a value from 1 to 1,000. If you don't specify a value, Route 53 returns up to 100 change batches.
string
If the response to a previous ListHostedZoneChangeBatches request included a NextToken element, specify that value here to get the next page of results. If the previous request included any of the following parameters, include them with exactly the same values: SubmittedAfter, SubmittedBefore, SortOrder, and StartAfterChangeId. If you don't, Route 53 returns an InvalidInput error. If you don't specify NextToken, Route 53 returns the first page of results.
A NextToken expires 24 hours after Route 53 returns it, and you can use it only with the hosted zone that it was returned for.
dict
Response Syntax
{
'ChangeBatchSummaries': [
{
'ChangeId': 'string',
'Operation': 'CreateHostedZone'|'DeleteHostedZone'|'ChangeResourceRecordSets',
'SubmittedAt': datetime(2015, 1, 1),
'SubmittedBy': 'string',
'RequestId': 'string',
'Comment': 'string',
'ChangeCount': 123
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ChangeBatchSummaries (list) --
A summary of each change batch on this page of results. The list is empty if there are no change batches in the range that you specified.
(dict) --
A summary of one change batch in the change history of a hosted zone.
ChangeId (string) --
The ID of the change batch. This is the same ID that ChangeResourceRecordSets returns in ChangeInfo/Id and that you pass to GetChange.
Operation (string) --
The Route 53 API operation that submitted the change batch: ChangeResourceRecordSets or CreateHostedZone. New values might be added, so ignore values that your code doesn't recognize.
SubmittedAt (datetime) --
The date and time, in UTC, when the change batch was submitted.
SubmittedBy (string) --
The Amazon Resource Name of the principal that submitted the request, for example, arn:aws:sts::111122223333:assumed-role/Admin/my-session. This element is absent when Route 53 has no principal to record for the change.
RequestId (string) --
The request ID of the call that submitted the change batch. CloudTrail records the same value in requestID, so you can use it to find the CloudTrail event for the change. This element is absent when there was no request.
Comment (string) --
The comment that was submitted with the change batch, if any.
ChangeCount (integer) --
The number of changes in the change batch. For CreateHostedZone, the value is 0.
NextToken (string) --
If there might be more change batches to list, a token that you can specify in the NextToken parameter of another request to get the next page of results. If there are no more change batches to list, the response doesn't include NextToken.
Lists the individual changes in the change history of a hosted zone. Each entry is one change, with the full resource record set that the change wrote or deleted. To list only the changes to the resource record sets that have a specific name and type, specify RecordName and RecordType. Weighted, latency, and other resource record sets that have the same name and type appear as separate entries, each with its SetIdentifier.
A change can take a few seconds to appear in ListResourceRecordSetChanges after it appears in ListHostedZoneChangeBatches. For a complete, ordered list of changes, use ListHostedZoneChangeBatches.
Results are paginated. To get the next page, use the NextToken value from the response.
If Change History isn't turned on for the hosted zone, Route 53 returns a FeatureNotEnabled error.
See also: AWS API Documentation
Request Syntax
client.list_resource_record_set_changes(
HostedZoneId='string',
RecordName='string',
RecordType='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
SubmittedAfter='string',
SubmittedBefore='string',
SortOrder='ASCENDING'|'DESCENDING',
MaxResults='string',
NextToken='string'
)
string
[REQUIRED]
The ID of the hosted zone that you want to list changes for.
string
The name of the resource record sets that you want to list changes for, for example, www.example.com. The name must be the name of the hosted zone or a subdomain of it. If you specify RecordName, you must also specify RecordType. If you specify neither, the results include every change in the hosted zone.
string
The DNS record type of the resource record sets that you want to list changes for. If you specify RecordType, you must also specify RecordName.
string
The start of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-01T00:00:00Z or 2026-12-01T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range includes SubmittedAfter.
If you don't specify a value, the range starts at RetentionStartsAt. If you specify a value that's earlier than RetentionStartsAt, Route 53 returns an InvalidInput error that includes the earliest time that you can specify.
Because submit times can be slightly out of order, a returned SubmittedAt can fall just outside the range that you requested.
string
The end of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-02T00:00:00Z or 2026-12-02T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range excludes SubmittedBefore. The value must be at least one millisecond later than SubmittedAfter, or later than RetentionStartsAt if you omit SubmittedAfter.
If the range ends within a few seconds of the current time, a later request for the same range might return more changes.
string
The order in which you want Route 53 to return changes. Valid values:
DESCENDING – Newest first. This is the default.
ASCENDING – Oldest first.
string
The maximum number of changes that you want Route 53 to return in this response. Specify a value from 1 to 100. If you don't specify a value, Route 53 returns up to 100 changes.
string
If the response to a previous ListResourceRecordSetChanges request included a NextToken element, specify that value here to get the next page of results. If the previous request included any of the following parameters, include them with exactly the same values: SubmittedAfter, SubmittedBefore, SortOrder, RecordName, and RecordType. If you don't, Route 53 returns an InvalidInput error. If you don't specify NextToken, Route 53 returns the first page of results.
A NextToken expires 24 hours after Route 53 returns it, and you can use it only with the hosted zone that it was returned for.
dict
Response Syntax
{
'ResourceRecordSetChanges': [
{
'ChangeId': 'string',
'Operation': 'CreateHostedZone'|'DeleteHostedZone'|'ChangeResourceRecordSets',
'SubmittedAt': datetime(2015, 1, 1),
'SubmittedBy': 'string',
'RequestId': 'string',
'Action': 'CREATE'|'DELETE'|'UPSERT',
'ResourceRecordSet': {
'Name': 'string',
'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
'SetIdentifier': 'string',
'Weight': 123,
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'cn-north-1'|'cn-northwest-1'|'ap-east-1'|'me-south-1'|'me-central-1'|'ap-south-1'|'ap-south-2'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'ap-southeast-7'|'us-gov-east-1'|'us-gov-west-1'|'ap-east-2'|'ap-southeast-6'|'eusc-de-east-1',
'GeoLocation': {
'ContinentCode': 'string',
'CountryCode': 'string',
'SubdivisionCode': 'string'
},
'Failover': 'PRIMARY'|'SECONDARY',
'MultiValueAnswer': True|False,
'TTL': 123,
'ResourceRecords': [
{
'Value': 'string'
},
],
'AliasTarget': {
'HostedZoneId': 'string',
'DNSName': 'string',
'EvaluateTargetHealth': True|False
},
'HealthCheckId': 'string',
'TrafficPolicyInstanceId': 'string',
'CidrRoutingConfig': {
'CollectionId': 'string',
'LocationName': 'string'
},
'GeoProximityLocation': {
'AWSRegion': 'string',
'LocalZoneGroup': 'string',
'Coordinates': {
'Latitude': 'string',
'Longitude': 'string'
},
'Bias': 123
},
'AZAffinity': {
'LocationType': 'AvailabilityZone'|'AvailabilityZoneGroup'|'Region'|'Partition'|'Global',
'LocationId': 'string'
}
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
ResourceRecordSetChanges (list) --
The changes on this page of results. The list is empty if there are no changes that match the request.
(dict) --
One change to a resource record set in the change history of a hosted zone, with the resource record set that the change wrote or deleted.
ChangeId (string) --
The ID of the change batch that contains the change. To get every change in the change batch, specify this ID in GetHostedZoneChangeBatch.
Operation (string) --
The Route 53 API operation that submitted the change. New values might be added, so ignore values that your code doesn't recognize.
SubmittedAt (datetime) --
The date and time, in UTC, when the change batch that contains the change was submitted.
SubmittedBy (string) --
The Amazon Resource Name of the principal that submitted the request. This element is absent when Route 53 has no principal to record for the change.
RequestId (string) --
The request ID of the call that submitted the change. CloudTrail records the same value in requestID. This element is absent when there was no request.
Action (string) --
The action in the change: CREATE, DELETE, or UPSERT.
ResourceRecordSet (dict) --
The resource record set that the change wrote or deleted, in the same form that ListResourceRecordSets returns. For example, the name is in lowercase and ends with a dot. For an UPSERT or a DELETE, the response doesn't contain the values that the resource record set had before the change.
Name (string) --
For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete. For ListResourceRecordSets responses, the name of a record in the specified hosted zone.
ChangeResourceRecordSets Only
Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.
You can use the asterisk (*) wildcard to replace the leftmost label in a domain name, for example, *.example.com. Note the following:
The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.
The * can't replace any of the middle labels, for example, marketing.*.example.com.
If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard.
Type (string) --
The DNS record type. For information about different record types and how data is encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS. When creating a group of weighted, latency, geolocation, or failover resource record sets, specify the same value for all of the resource record sets in the group.
Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT``| ``CAA``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for alias resource record sets:
Amazon API Gateway custom regional APIs and edge-optimized APIs: A
CloudFront distributions: A If IPv6 is enabled for the distribution, create two resource record sets to route traffic to your distribution, one with a value of A and one with a value of AAAA.
Amazon API Gateway environment that has a regionalized subdomain: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Amazon Virtual Private Cloud interface VPC endpoints A
Another resource record set in this hosted zone: Specify the type of the resource record set that you're creating the alias for. All values are supported except NS and SOA.
SetIdentifier (string) --
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.
For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.
Weight (integer) --
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set. Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total. Note the following:
You must specify a value for the Weight element for every weighted resource record set.
You can only specify one ResourceRecord per weighted resource record set.
You can't create latency, failover, or geolocation resource record sets that have the same values for the Name and Type elements as weighted resource record sets.
You can create a maximum of 100 weighted resource record sets that have the same values for the Name and Type elements.
For weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a resource record set, Route 53 never responds to queries with the applicable value for that resource record set. However, if you set Weight to 0 for all resource record sets that have the same combination of DNS name and type, traffic is routed to all resources with equal probability. The effect of setting Weight to 0 is different when you associate health checks with weighted resource record sets. For more information, see Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon Route 53 Developer Guide.
Region (string) --
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.
When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.
Note the following:
You can only specify one ResourceRecord per latency resource record set.
You can only create one latency resource record set for each Amazon EC2 Region.
You aren't required to create latency resource record sets for all Amazon EC2 Regions. Route 53 will choose the region with the best latency from among the regions that you create latency resource record sets for.
You can't create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF.
If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource.
You can't create two geolocation resource record sets that specify the same geographic location.
The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements.
You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets.
ContinentCode (string) --
The two-letter code for the continent.
Amazon Route 53 supports the following continent codes:
AF: Africa
AN: Antarctica
AS: Asia
EU: Europe
OC: Oceania
NA: North America
SA: South America
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
For geolocation resource record sets, the two-letter code for a country.
Amazon Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2.
Route 53 also supports the country code UA for Ukraine.
SubdivisionCode (string) --
For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn't support any other values for SubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website.
If you specify subdivisioncode, you must also specify US for CountryCode.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You can't create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Route 53, see the following topics in the Amazon Route 53 Developer Guide:
MultiValueAnswer (boolean) --
Multivalue answer resource record sets only: To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specify true for MultiValueAnswer. Note the following:
If you associate a health check with a multivalue answer resource record set, Amazon Route 53 responds to DNS queries with the corresponding IP address only when the health check is healthy.
If you don't associate a health check with a multivalue answer record, Route 53 always considers the record to be healthy.
Route 53 responds to DNS queries with up to eight healthy records; if you have eight or fewer healthy records, Route 53 responds to all DNS queries with all the healthy records.
If you have more than eight healthy records, Route 53 responds to different DNS resolvers with different combinations of healthy records.
When all records are unhealthy, Route 53 responds to DNS queries with up to eight unhealthy records.
If a resource becomes unavailable after a resolver caches a response, client software typically tries another of the IP addresses in the response.
You can't create multivalue answer alias records.
TTL (integer) --
The resource record cache time to live (TTL), in seconds. Note the following:
If you're creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
Information about the resource records to act upon.
(dict) --
Information specific to the resource record.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the Amazon Web Services resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.
If you're creating resource records sets for a private hosted zone, note the following:
You can't create an alias resource record set in a private hosted zone to route traffic to a CloudFront distribution.
For information about creating failover resource record sets in a private hosted zone, see Configuring Failover in a Private Hosted Zone in the Amazon Route 53 Developer Guide.
HostedZoneId (string) --
Alias resource records sets only: The value used depends on where you want to route traffic:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the hosted zone ID for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalHostedZoneId.
For edge-optimized APIs, specify the value of distributionHostedZoneId.
Amazon Virtual Private Cloud interface VPC endpoint
Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify Z2FDTNDATAQYW2.
Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference.
ELB load balancer
Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
Amazon Web Services Management Console: Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneId.
CLI: Use describe-load-balancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneId.
Global Accelerator accelerator
Specify Z2BJ6XQ5FK7U4H.
An Amazon S3 bucket configured as a static website
Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference.
Another Route 53 resource record set in your hosted zone
Specify the hosted zone ID of your hosted zone. (An alias resource record set can't reference a resource record set in a different hosted zone.)
DNSName (string) --
Alias resource record sets only: The value that you specify depends on where you want to route queries:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the applicable domain name for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalDomainName.
For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the associated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.
Enter the API endpoint for the interface endpoint, such as vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify the domain name that CloudFront assigned when you created your distribution.
Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.
If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.
For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. You can use the following methods to get the value of the CNAME attribute:
Amazon Web Services Management Console: For information about how to get the value by using the console, see Using Custom Domains with Elastic Beanstalk in the Elastic Beanstalk Developer Guide.
Elastic Beanstalk API: Use the DescribeEnvironments action to get the value of the CNAME attribute. For more information, see DescribeEnvironments in the Elastic Beanstalk API Reference.
CLI: Use the describe-environments command to get the value of the CNAME attribute. For more information, see describe-environments in the CLI Command Reference.
ELB load balancer
Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Amazon Web Services Management Console, the ELB API, or the CLI.
Amazon Web Services Management Console: Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field. If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. If you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: DescribeLoadBalancers
Application and Network Load Balancers: DescribeLoadBalancers
CLI: Use describe-load-balancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: describe-load-balancers
Application and Network Load Balancers: describe-load-balancers
Global Accelerator accelerator
Specify the DNS name for your accelerator:
Global Accelerator API: To get the DNS name, use DescribeAccelerator.
CLI: To get the DNS name, use describe-accelerator.
Amazon S3 bucket that is configured as a static website
Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference. For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide.
Another Route 53 resource record set
Specify the value of the Name element for a resource record set in the current hosted zone.
EvaluateTargetHealth (boolean) --
Applies only to alias, az-affinity alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets: When EvaluateTargetHealth is true, an alias resource record set inherits the health of the referenced Amazon Web Services resource, such as an ELB load balancer or another resource record set in the hosted zone.
Note the following:
CloudFront distributions
You can't set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
Elastic Beanstalk environments that have regionalized subdomains
If you specify an Elastic Beanstalk environment in DNSName and the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any.
If the environment contains a single Amazon EC2 instance, there are no special requirements.
ELB load balancers
Health checking behavior depends on the type of load balancer:
Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you set EvaluateTargetHealth to true and either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources.
Application and Network Load Balancers: If you specify an ELB Application or Network Load Balancer and you set EvaluateTargetHealth to true, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer:
For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.
A target group that has no registered targets is considered unhealthy.
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an API Gateway API. However, because API Gateway is highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
S3 buckets
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an S3 bucket. However, because S3 buckets are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
VPC interface endpoints
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
Other records in the same hosted zone
If the Amazon Web Services resource that you specify in DNSName is a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the HealthCheckId element and specify the ID of the applicable health check.
Route 53 determines whether a resource record set is healthy based on one of the following:
By periodically sending a request to the endpoint that is specified in the health check
By aggregating the status of a specified group of health checks (calculated health checks)
By determining the current state of a CloudWatch alarm (CloudWatch metric health checks)
For more information, see the following topics in the Amazon Route 53 Developer Guide:
When to Specify HealthCheckId
Specifying a value for HealthCheckId is useful only when Route 53 is choosing between two or more resource record sets to respond to a DNS query, and you want Route 53 to base the choice in part on the status of a health check. Configuring health checks makes sense only in the following configurations:
Non-alias resource record sets: You're checking the health of a group of non-alias resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A) and you specify health check IDs for all the resource record sets. If the health check status for a resource record set is healthy, Route 53 includes the record among the records that it responds to DNS queries with. If the health check status for a resource record set is unhealthy, Route 53 stops responding to DNS queries using the value for that resource record set. If the health check status for all resource record sets in the group is unhealthy, Route 53 considers all resource record sets in the group healthy and responds to DNS queries accordingly.
Alias resource record sets: You specify the following settings:
You set EvaluateTargetHealth to true for an alias resource record set in a group of resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A).
You configure the alias resource record set to route traffic to a non-alias resource record set in the same hosted zone.
You specify a health check ID for the non-alias resource record set.
If the health check status is healthy, Route 53 considers the alias resource record set to be healthy and includes the alias record among the records that it responds to DNS queries with.
If the health check status is unhealthy, Route 53 stops responding to DNS queries using the alias resource record set.
Geolocation Routing
For geolocation resource record sets, if an endpoint is unhealthy, Route 53 looks for a resource record set for the larger, associated geographic region. For example, suppose you have resource record sets for a state in the United States, for the entire United States, for North America, and a resource record set that has * for CountryCode is *, which applies to all locations. If the endpoint for the state resource record set is unhealthy, Route 53 checks for healthy resource record sets in the following order until it finds a resource record set for which the endpoint is healthy:
The United States
North America
The default resource record set
Specifying the Health Check Endpoint by Domain Name
If your health checks specify the endpoint only 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 FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets ( www.example.com).
TrafficPolicyInstanceId (string) --
When you create a traffic policy instance, Amazon Route 53 automatically creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic policy instance that Route 53 created this resource record set for.
CidrRoutingConfig (dict) --
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A LocationName with an asterisk “*” can be used to create a default CIDR record. CollectionId is still required for default record.
CollectionId (string) --
The CIDR collection ID.
LocationName (string) --
The CIDR collection location name.
GeoProximityLocation (dict) --
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.
AWSRegion (string) --
The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
LocalZoneGroup (string) --
Specifies an Amazon Web Services Local Zone Group.
A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is us-east-1-bue-1.
You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command:
This command returns: "GroupName": "us-west-2-den-1", specifying that the Local Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1.
Coordinates (dict) --
Contains the longitude and latitude for a geographic region.
Latitude (string) --
Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
Longitude (string) --
Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
Bias (integer) --
The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
To use Bias to change the size of the geographic region, specify the applicable value for the bias:
To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
AZAffinity (dict) --
AZ-affinity resource record sets only: The location that this resource record set answers DNS queries from, such as an Availability Zone (AZ) or an Amazon Web Services Region. For each query, Route 53 starts with the most specific location that the query matches and falls back to a less specific location when there's no record for that location or the record is unhealthy (its health check fails or, for an alias record that has EvaluateTargetHealth set to true, its target is unhealthy). You must also specify SetIdentifier, and you can't specify another routing policy element, such as Weight, in the same resource record set.
For more information, see AZ-affinity routing in the Amazon Route 53 Developer Guide.
LocationType (string) --
The level of the location that LocationId identifies. Valid values, from most to least specific:
AvailabilityZone: A single Availability Zone.
AvailabilityZoneGroup: A Zone Group, which is a group of Availability Zones in an Amazon Web Services Region.
Region: An entire Amazon Web Services Region.
Partition: An entire Amazon Web Services partition.
Global: All locations.
We recommend that you create a record for the Global location type so that every query gets an answer. Route 53 responds with it when a query matches no more specific record, or when it's the only healthy record that matches. Without a Global record, Route 53 returns a "no answer" response to queries that don't match any other record.
LocationId (string) --
The ID of the location. You can specify only generally available Availability Zones and Zone Groups. Zone Group, Region, and partition IDs must belong to a partition that you can use. Specify the ID in lowercase, in the format that corresponds to LocationType:
For AvailabilityZone, the Availability Zone ID (not the Availability Zone name or a Local Zone ID), such as use1-az1.
For AvailabilityZoneGroup, the Zone Group that an Availability Zone belongs to (not a Local Zone group), such as us-east-1-zg-1.
For Region, the Region code, such as us-east-1.
For Partition, the partition name, such as aws.
For Global, the value global.
NextToken (string) --
If there might be more changes to list, a token that you can specify in the NextToken parameter of another request to get the next page of results. If there are no more changes to list, the response doesn't include NextToken.
Returns one change batch from the change history of a hosted zone, including every change in the batch. Each resource record set is in the same form that ListResourceRecordSets returns. For example, the name is in lowercase and ends with a dot. For an UPSERT or a DELETE, the response doesn't contain the values that the resource record set had before the change.
If the change batch isn't in the hosted zone's retained change history, for example because it's in another hosted zone, it expired, or it's from before RetentionStartsAt, Route 53 returns a NoSuchChange error. If Change History isn't turned on for the hosted zone, Route 53 returns a FeatureNotEnabled error.
See also: AWS API Documentation
Request Syntax
client.get_hosted_zone_change_batch(
HostedZoneId='string',
ChangeId='string'
)
string
[REQUIRED]
The ID of the hosted zone that contains the change batch.
string
[REQUIRED]
The ID of the change batch that you want to get. This is the ID that ChangeResourceRecordSets returns in ChangeInfo/Id. You can specify the ID with or without the /change/ prefix.
dict
Response Syntax
{
'ChangeBatchSummary': {
'ChangeId': 'string',
'Operation': 'CreateHostedZone'|'DeleteHostedZone'|'ChangeResourceRecordSets',
'SubmittedAt': datetime(2015, 1, 1),
'SubmittedBy': 'string',
'RequestId': 'string',
'Comment': 'string',
'ChangeCount': 123
},
'ChangeBatch': {
'Comment': 'string',
'Changes': [
{
'Action': 'CREATE'|'DELETE'|'UPSERT',
'ResourceRecordSet': {
'Name': 'string',
'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
'SetIdentifier': 'string',
'Weight': 123,
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'cn-north-1'|'cn-northwest-1'|'ap-east-1'|'me-south-1'|'me-central-1'|'ap-south-1'|'ap-south-2'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'ap-southeast-7'|'us-gov-east-1'|'us-gov-west-1'|'ap-east-2'|'ap-southeast-6'|'eusc-de-east-1',
'GeoLocation': {
'ContinentCode': 'string',
'CountryCode': 'string',
'SubdivisionCode': 'string'
},
'Failover': 'PRIMARY'|'SECONDARY',
'MultiValueAnswer': True|False,
'TTL': 123,
'ResourceRecords': [
{
'Value': 'string'
},
],
'AliasTarget': {
'HostedZoneId': 'string',
'DNSName': 'string',
'EvaluateTargetHealth': True|False
},
'HealthCheckId': 'string',
'TrafficPolicyInstanceId': 'string',
'CidrRoutingConfig': {
'CollectionId': 'string',
'LocationName': 'string'
},
'GeoProximityLocation': {
'AWSRegion': 'string',
'LocalZoneGroup': 'string',
'Coordinates': {
'Latitude': 'string',
'Longitude': 'string'
},
'Bias': 123
},
'AZAffinity': {
'LocationType': 'AvailabilityZone'|'AvailabilityZoneGroup'|'Region'|'Partition'|'Global',
'LocationId': 'string'
}
}
},
]
}
}
Response Structure
(dict) --
ChangeBatchSummary (dict) --
A summary of the change batch, including who submitted it and when.
ChangeId (string) --
The ID of the change batch. This is the same ID that ChangeResourceRecordSets returns in ChangeInfo/Id and that you pass to GetChange.
Operation (string) --
The Route 53 API operation that submitted the change batch: ChangeResourceRecordSets or CreateHostedZone. New values might be added, so ignore values that your code doesn't recognize.
SubmittedAt (datetime) --
The date and time, in UTC, when the change batch was submitted.
SubmittedBy (string) --
The Amazon Resource Name of the principal that submitted the request, for example, arn:aws:sts::111122223333:assumed-role/Admin/my-session. This element is absent when Route 53 has no principal to record for the change.
RequestId (string) --
The request ID of the call that submitted the change batch. CloudTrail records the same value in requestID, so you can use it to find the CloudTrail event for the change. This element is absent when there was no request.
Comment (string) --
The comment that was submitted with the change batch, if any.
ChangeCount (integer) --
The number of changes in the change batch. For CreateHostedZone, the value is 0.
ChangeBatch (dict) --
The changes in the change batch. Each resource record set is in the same form that ListResourceRecordSets returns. For example, the name is in lowercase and ends with a dot.
Comment (string) --
Optional: Any comments you want to include about a change batch request.
Changes (list) --
Information about the changes to make to the record sets.
(dict) --
The information for each resource record set that you want to change.
Action (string) --
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set.
UPSERT: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.
ResourceRecordSet (dict) --
Information about the resource record set to create, delete, or update.
Name (string) --
For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete. For ListResourceRecordSets responses, the name of a record in the specified hosted zone.
ChangeResourceRecordSets Only
Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.
You can use the asterisk (*) wildcard to replace the leftmost label in a domain name, for example, *.example.com. Note the following:
The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.
The * can't replace any of the middle labels, for example, marketing.*.example.com.
If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard.
Type (string) --
The DNS record type. For information about different record types and how data is encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS. When creating a group of weighted, latency, geolocation, or failover resource record sets, specify the same value for all of the resource record sets in the group.
Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT``| ``CAA``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for alias resource record sets:
Amazon API Gateway custom regional APIs and edge-optimized APIs: A
CloudFront distributions: A If IPv6 is enabled for the distribution, create two resource record sets to route traffic to your distribution, one with a value of A and one with a value of AAAA.
Amazon API Gateway environment that has a regionalized subdomain: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Amazon Virtual Private Cloud interface VPC endpoints A
Another resource record set in this hosted zone: Specify the type of the resource record set that you're creating the alias for. All values are supported except NS and SOA.
SetIdentifier (string) --
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.
For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.
Weight (integer) --
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set. Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total. Note the following:
You must specify a value for the Weight element for every weighted resource record set.
You can only specify one ResourceRecord per weighted resource record set.
You can't create latency, failover, or geolocation resource record sets that have the same values for the Name and Type elements as weighted resource record sets.
You can create a maximum of 100 weighted resource record sets that have the same values for the Name and Type elements.
For weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a resource record set, Route 53 never responds to queries with the applicable value for that resource record set. However, if you set Weight to 0 for all resource record sets that have the same combination of DNS name and type, traffic is routed to all resources with equal probability. The effect of setting Weight to 0 is different when you associate health checks with weighted resource record sets. For more information, see Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon Route 53 Developer Guide.
Region (string) --
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.
When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.
Note the following:
You can only specify one ResourceRecord per latency resource record set.
You can only create one latency resource record set for each Amazon EC2 Region.
You aren't required to create latency resource record sets for all Amazon EC2 Regions. Route 53 will choose the region with the best latency from among the regions that you create latency resource record sets for.
You can't create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF.
If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource.
You can't create two geolocation resource record sets that specify the same geographic location.
The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements.
You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets.
ContinentCode (string) --
The two-letter code for the continent.
Amazon Route 53 supports the following continent codes:
AF: Africa
AN: Antarctica
AS: Asia
EU: Europe
OC: Oceania
NA: North America
SA: South America
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
For geolocation resource record sets, the two-letter code for a country.
Amazon Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2.
Route 53 also supports the country code UA for Ukraine.
SubdivisionCode (string) --
For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn't support any other values for SubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website.
If you specify subdivisioncode, you must also specify US for CountryCode.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You can't create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Route 53, see the following topics in the Amazon Route 53 Developer Guide:
MultiValueAnswer (boolean) --
Multivalue answer resource record sets only: To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specify true for MultiValueAnswer. Note the following:
If you associate a health check with a multivalue answer resource record set, Amazon Route 53 responds to DNS queries with the corresponding IP address only when the health check is healthy.
If you don't associate a health check with a multivalue answer record, Route 53 always considers the record to be healthy.
Route 53 responds to DNS queries with up to eight healthy records; if you have eight or fewer healthy records, Route 53 responds to all DNS queries with all the healthy records.
If you have more than eight healthy records, Route 53 responds to different DNS resolvers with different combinations of healthy records.
When all records are unhealthy, Route 53 responds to DNS queries with up to eight unhealthy records.
If a resource becomes unavailable after a resolver caches a response, client software typically tries another of the IP addresses in the response.
You can't create multivalue answer alias records.
TTL (integer) --
The resource record cache time to live (TTL), in seconds. Note the following:
If you're creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
Information about the resource records to act upon.
(dict) --
Information specific to the resource record.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the Amazon Web Services resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.
If you're creating resource records sets for a private hosted zone, note the following:
You can't create an alias resource record set in a private hosted zone to route traffic to a CloudFront distribution.
For information about creating failover resource record sets in a private hosted zone, see Configuring Failover in a Private Hosted Zone in the Amazon Route 53 Developer Guide.
HostedZoneId (string) --
Alias resource records sets only: The value used depends on where you want to route traffic:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the hosted zone ID for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalHostedZoneId.
For edge-optimized APIs, specify the value of distributionHostedZoneId.
Amazon Virtual Private Cloud interface VPC endpoint
Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify Z2FDTNDATAQYW2.
Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference.
ELB load balancer
Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
Amazon Web Services Management Console: Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneId.
CLI: Use describe-load-balancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneId.
Global Accelerator accelerator
Specify Z2BJ6XQ5FK7U4H.
An Amazon S3 bucket configured as a static website
Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference.
Another Route 53 resource record set in your hosted zone
Specify the hosted zone ID of your hosted zone. (An alias resource record set can't reference a resource record set in a different hosted zone.)
DNSName (string) --
Alias resource record sets only: The value that you specify depends on where you want to route queries:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the applicable domain name for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalDomainName.
For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the associated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.
Enter the API endpoint for the interface endpoint, such as vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify the domain name that CloudFront assigned when you created your distribution.
Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.
If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.
For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. You can use the following methods to get the value of the CNAME attribute:
Amazon Web Services Management Console: For information about how to get the value by using the console, see Using Custom Domains with Elastic Beanstalk in the Elastic Beanstalk Developer Guide.
Elastic Beanstalk API: Use the DescribeEnvironments action to get the value of the CNAME attribute. For more information, see DescribeEnvironments in the Elastic Beanstalk API Reference.
CLI: Use the describe-environments command to get the value of the CNAME attribute. For more information, see describe-environments in the CLI Command Reference.
ELB load balancer
Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Amazon Web Services Management Console, the ELB API, or the CLI.
Amazon Web Services Management Console: Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field. If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. If you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: DescribeLoadBalancers
Application and Network Load Balancers: DescribeLoadBalancers
CLI: Use describe-load-balancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: describe-load-balancers
Application and Network Load Balancers: describe-load-balancers
Global Accelerator accelerator
Specify the DNS name for your accelerator:
Global Accelerator API: To get the DNS name, use DescribeAccelerator.
CLI: To get the DNS name, use describe-accelerator.
Amazon S3 bucket that is configured as a static website
Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference. For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide.
Another Route 53 resource record set
Specify the value of the Name element for a resource record set in the current hosted zone.
EvaluateTargetHealth (boolean) --
Applies only to alias, az-affinity alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets: When EvaluateTargetHealth is true, an alias resource record set inherits the health of the referenced Amazon Web Services resource, such as an ELB load balancer or another resource record set in the hosted zone.
Note the following:
CloudFront distributions
You can't set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
Elastic Beanstalk environments that have regionalized subdomains
If you specify an Elastic Beanstalk environment in DNSName and the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any.
If the environment contains a single Amazon EC2 instance, there are no special requirements.
ELB load balancers
Health checking behavior depends on the type of load balancer:
Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you set EvaluateTargetHealth to true and either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources.
Application and Network Load Balancers: If you specify an ELB Application or Network Load Balancer and you set EvaluateTargetHealth to true, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer:
For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.
A target group that has no registered targets is considered unhealthy.
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an API Gateway API. However, because API Gateway is highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
S3 buckets
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an S3 bucket. However, because S3 buckets are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
VPC interface endpoints
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
Other records in the same hosted zone
If the Amazon Web Services resource that you specify in DNSName is a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the HealthCheckId element and specify the ID of the applicable health check.
Route 53 determines whether a resource record set is healthy based on one of the following:
By periodically sending a request to the endpoint that is specified in the health check
By aggregating the status of a specified group of health checks (calculated health checks)
By determining the current state of a CloudWatch alarm (CloudWatch metric health checks)
For more information, see the following topics in the Amazon Route 53 Developer Guide:
When to Specify HealthCheckId
Specifying a value for HealthCheckId is useful only when Route 53 is choosing between two or more resource record sets to respond to a DNS query, and you want Route 53 to base the choice in part on the status of a health check. Configuring health checks makes sense only in the following configurations:
Non-alias resource record sets: You're checking the health of a group of non-alias resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A) and you specify health check IDs for all the resource record sets. If the health check status for a resource record set is healthy, Route 53 includes the record among the records that it responds to DNS queries with. If the health check status for a resource record set is unhealthy, Route 53 stops responding to DNS queries using the value for that resource record set. If the health check status for all resource record sets in the group is unhealthy, Route 53 considers all resource record sets in the group healthy and responds to DNS queries accordingly.
Alias resource record sets: You specify the following settings:
You set EvaluateTargetHealth to true for an alias resource record set in a group of resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A).
You configure the alias resource record set to route traffic to a non-alias resource record set in the same hosted zone.
You specify a health check ID for the non-alias resource record set.
If the health check status is healthy, Route 53 considers the alias resource record set to be healthy and includes the alias record among the records that it responds to DNS queries with.
If the health check status is unhealthy, Route 53 stops responding to DNS queries using the alias resource record set.
Geolocation Routing
For geolocation resource record sets, if an endpoint is unhealthy, Route 53 looks for a resource record set for the larger, associated geographic region. For example, suppose you have resource record sets for a state in the United States, for the entire United States, for North America, and a resource record set that has * for CountryCode is *, which applies to all locations. If the endpoint for the state resource record set is unhealthy, Route 53 checks for healthy resource record sets in the following order until it finds a resource record set for which the endpoint is healthy:
The United States
North America
The default resource record set
Specifying the Health Check Endpoint by Domain Name
If your health checks specify the endpoint only 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 FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets ( www.example.com).
TrafficPolicyInstanceId (string) --
When you create a traffic policy instance, Amazon Route 53 automatically creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic policy instance that Route 53 created this resource record set for.
CidrRoutingConfig (dict) --
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A LocationName with an asterisk “*” can be used to create a default CIDR record. CollectionId is still required for default record.
CollectionId (string) --
The CIDR collection ID.
LocationName (string) --
The CIDR collection location name.
GeoProximityLocation (dict) --
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.
AWSRegion (string) --
The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
LocalZoneGroup (string) --
Specifies an Amazon Web Services Local Zone Group.
A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is us-east-1-bue-1.
You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command:
This command returns: "GroupName": "us-west-2-den-1", specifying that the Local Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1.
Coordinates (dict) --
Contains the longitude and latitude for a geographic region.
Latitude (string) --
Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
Longitude (string) --
Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
Bias (integer) --
The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
To use Bias to change the size of the geographic region, specify the applicable value for the bias:
To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
AZAffinity (dict) --
AZ-affinity resource record sets only: The location that this resource record set answers DNS queries from, such as an Availability Zone (AZ) or an Amazon Web Services Region. For each query, Route 53 starts with the most specific location that the query matches and falls back to a less specific location when there's no record for that location or the record is unhealthy (its health check fails or, for an alias record that has EvaluateTargetHealth set to true, its target is unhealthy). You must also specify SetIdentifier, and you can't specify another routing policy element, such as Weight, in the same resource record set.
For more information, see AZ-affinity routing in the Amazon Route 53 Developer Guide.
LocationType (string) --
The level of the location that LocationId identifies. Valid values, from most to least specific:
AvailabilityZone: A single Availability Zone.
AvailabilityZoneGroup: A Zone Group, which is a group of Availability Zones in an Amazon Web Services Region.
Region: An entire Amazon Web Services Region.
Partition: An entire Amazon Web Services partition.
Global: All locations.
We recommend that you create a record for the Global location type so that every query gets an answer. Route 53 responds with it when a query matches no more specific record, or when it's the only healthy record that matches. Without a Global record, Route 53 returns a "no answer" response to queries that don't match any other record.
LocationId (string) --
The ID of the location. You can specify only generally available Availability Zones and Zone Groups. Zone Group, Region, and partition IDs must belong to a partition that you can use. Specify the ID in lowercase, in the format that corresponds to LocationType:
For AvailabilityZone, the Availability Zone ID (not the Availability Zone name or a Local Zone ID), such as use1-az1.
For AvailabilityZoneGroup, the Zone Group that an Availability Zone belongs to (not a Local Zone group), such as us-east-1-zg-1.
For Region, the Region code, such as us-east-1.
For Partition, the partition name, such as aws.
For Global, the value global.
{'ChangeBatch': {'Changes': {'ResourceRecordSet': {'AZAffinity': {'LocationId': 'string',
'LocationType': 'AvailabilityZone '
'| '
'AvailabilityZoneGroup '
'| '
'Region '
'| '
'Partition '
'| '
'Global'}}}}}
Creates, changes, or deletes a resource record set, which contains authoritative DNS information for a specified domain name or subdomain name. For example, you can use ChangeResourceRecordSets to create a resource record set that routes traffic for test.example.com to a web server that has an IP address of 192.0.2.44.
Deleting Resource Record Sets
To delete a resource record set, you must specify all the same values that you specified when you created it.
Change Batches and Transactional Changes
The request body must include a document with a ChangeResourceRecordSetsRequest element. The request body contains a list of change items, known as a change batch. Change batches are considered transactional changes. Route 53 validates the changes in the request and then either makes all or none of the changes in the change batch request. This ensures that DNS routing isn't adversely affected by partial changes to the resource record sets in a hosted zone.
For example, suppose a change batch request contains two changes: it deletes the CNAME resource record set for www.example.com and creates an alias resource record set for www.example.com. If validation for both records succeeds, Route 53 deletes the first resource record set and creates the second resource record set in a single operation. If validation for either the DELETE or the CREATE action fails, then the request is canceled, and the original CNAME record continues to exist.
Protected Resource Record Sets
If a resource record set protection exists for a name and type, Route 53 rejects any change in the change batch that creates, updates, or deletes a resource record set with that name and type. Because change batches are transactional, Route 53 rejects the entire request and returns an InvalidChangeBatch error. Route 53 identifies each protected resource record set in the error message and includes the protection's comment, if any. To make the change, first delete the protection by using DeleteResourceRecordSetProtections. To see which resource record sets are protected, use ListResourceRecordSetProtections.
Traffic Flow
To create resource record sets for complex routing configurations, use either the traffic flow visual editor in the Route 53 console or the API actions for traffic policies and traffic policy instances. Save the configuration as a traffic policy, then associate the traffic policy with one or more domain names (such as example.com) or subdomain names (such as www.example.com), in the same hosted zone or in multiple hosted zones. You can roll back the updates if the new configuration isn't performing as expected. For more information, see Using Traffic Flow to Route DNS Traffic in the Amazon Route 53 Developer Guide.
Create, Delete, and Upsert
Use ChangeResourceRecordsSetsRequest to perform the following actions:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes an existing resource record set that has the specified values.
UPSERT: If a resource set doesn't exist, Route 53 creates it. If a resource set exists Route 53 updates it with the values in the request.
Syntaxes for Creating, Updating, and Deleting Resource Record Sets
The syntax for a request depends on the type of resource record set that you want to create, delete, or update, such as weighted, alias, or failover. The XML elements in your request must appear in the order listed in the syntax.
For an example for each type of resource record set, see "Examples."
Don't refer to the syntax in the "Parameter Syntax" section, which includes all of the elements for every kind of resource record set that you can create, delete, or update by using ChangeResourceRecordSets.
Change Propagation to Route 53 DNS Servers
When you submit a ChangeResourceRecordSets request, Route 53 propagates your changes to all of the Route 53 authoritative DNS servers managing the hosted zone. While your changes are propagating, GetChange returns a status of PENDING. When propagation is complete, GetChange returns a status of INSYNC. Changes generally propagate to all Route 53 name servers managing the hosted zone within 60 seconds. For more information, see GetChange.
Limits on ChangeResourceRecordSets Requests
For information about the limits on a ChangeResourceRecordSets request, see Limits in the Amazon Route 53 Developer Guide.
See also: AWS API Documentation
Request Syntax
client.change_resource_record_sets(
HostedZoneId='string',
ChangeBatch={
'Comment': 'string',
'Changes': [
{
'Action': 'CREATE'|'DELETE'|'UPSERT',
'ResourceRecordSet': {
'Name': 'string',
'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
'SetIdentifier': 'string',
'Weight': 123,
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'cn-north-1'|'cn-northwest-1'|'ap-east-1'|'me-south-1'|'me-central-1'|'ap-south-1'|'ap-south-2'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'ap-southeast-7'|'us-gov-east-1'|'us-gov-west-1'|'ap-east-2'|'ap-southeast-6'|'eusc-de-east-1',
'GeoLocation': {
'ContinentCode': 'string',
'CountryCode': 'string',
'SubdivisionCode': 'string'
},
'Failover': 'PRIMARY'|'SECONDARY',
'MultiValueAnswer': True|False,
'TTL': 123,
'ResourceRecords': [
{
'Value': 'string'
},
],
'AliasTarget': {
'HostedZoneId': 'string',
'DNSName': 'string',
'EvaluateTargetHealth': True|False
},
'HealthCheckId': 'string',
'TrafficPolicyInstanceId': 'string',
'CidrRoutingConfig': {
'CollectionId': 'string',
'LocationName': 'string'
},
'GeoProximityLocation': {
'AWSRegion': 'string',
'LocalZoneGroup': 'string',
'Coordinates': {
'Latitude': 'string',
'Longitude': 'string'
},
'Bias': 123
},
'AZAffinity': {
'LocationType': 'AvailabilityZone'|'AvailabilityZoneGroup'|'Region'|'Partition'|'Global',
'LocationId': 'string'
}
}
},
]
}
)
string
[REQUIRED]
The ID of the hosted zone that contains the resource record sets that you want to change.
dict
[REQUIRED]
A complex type that contains an optional comment and the Changes element.
Comment (string) --
Optional: Any comments you want to include about a change batch request.
Changes (list) -- [REQUIRED]
Information about the changes to make to the record sets.
(dict) --
The information for each resource record set that you want to change.
Action (string) -- [REQUIRED]
The action to perform:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes a existing resource record set.
UPSERT: If a resource record set doesn't already exist, Route 53 creates it. If a resource record set does exist, Route 53 updates it with the values in the request.
ResourceRecordSet (dict) -- [REQUIRED]
Information about the resource record set to create, delete, or update.
Name (string) -- [REQUIRED]
For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete. For ListResourceRecordSets responses, the name of a record in the specified hosted zone.
ChangeResourceRecordSets Only
Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.
You can use the asterisk (*) wildcard to replace the leftmost label in a domain name, for example, *.example.com. Note the following:
The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.
The * can't replace any of the middle labels, for example, marketing.*.example.com.
If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard.
Type (string) -- [REQUIRED]
The DNS record type. For information about different record types and how data is encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS. When creating a group of weighted, latency, geolocation, or failover resource record sets, specify the same value for all of the resource record sets in the group.
Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT``| ``CAA``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for alias resource record sets:
Amazon API Gateway custom regional APIs and edge-optimized APIs: A
CloudFront distributions: A If IPv6 is enabled for the distribution, create two resource record sets to route traffic to your distribution, one with a value of A and one with a value of AAAA.
Amazon API Gateway environment that has a regionalized subdomain: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Amazon Virtual Private Cloud interface VPC endpoints A
Another resource record set in this hosted zone: Specify the type of the resource record set that you're creating the alias for. All values are supported except NS and SOA.
SetIdentifier (string) --
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.
For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.
Weight (integer) --
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set. Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total. Note the following:
You must specify a value for the Weight element for every weighted resource record set.
You can only specify one ResourceRecord per weighted resource record set.
You can't create latency, failover, or geolocation resource record sets that have the same values for the Name and Type elements as weighted resource record sets.
You can create a maximum of 100 weighted resource record sets that have the same values for the Name and Type elements.
For weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a resource record set, Route 53 never responds to queries with the applicable value for that resource record set. However, if you set Weight to 0 for all resource record sets that have the same combination of DNS name and type, traffic is routed to all resources with equal probability. The effect of setting Weight to 0 is different when you associate health checks with weighted resource record sets. For more information, see Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon Route 53 Developer Guide.
Region (string) --
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.
When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.
Note the following:
You can only specify one ResourceRecord per latency resource record set.
You can only create one latency resource record set for each Amazon EC2 Region.
You aren't required to create latency resource record sets for all Amazon EC2 Regions. Route 53 will choose the region with the best latency from among the regions that you create latency resource record sets for.
You can't create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF.
If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource.
You can't create two geolocation resource record sets that specify the same geographic location.
The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements.
You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets.
ContinentCode (string) --
The two-letter code for the continent.
Amazon Route 53 supports the following continent codes:
AF: Africa
AN: Antarctica
AS: Asia
EU: Europe
OC: Oceania
NA: North America
SA: South America
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
For geolocation resource record sets, the two-letter code for a country.
Amazon Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2.
Route 53 also supports the country code UA for Ukraine.
SubdivisionCode (string) --
For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn't support any other values for SubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website.
If you specify subdivisioncode, you must also specify US for CountryCode.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You can't create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Route 53, see the following topics in the Amazon Route 53 Developer Guide:
MultiValueAnswer (boolean) --
Multivalue answer resource record sets only: To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specify true for MultiValueAnswer. Note the following:
If you associate a health check with a multivalue answer resource record set, Amazon Route 53 responds to DNS queries with the corresponding IP address only when the health check is healthy.
If you don't associate a health check with a multivalue answer record, Route 53 always considers the record to be healthy.
Route 53 responds to DNS queries with up to eight healthy records; if you have eight or fewer healthy records, Route 53 responds to all DNS queries with all the healthy records.
If you have more than eight healthy records, Route 53 responds to different DNS resolvers with different combinations of healthy records.
When all records are unhealthy, Route 53 responds to DNS queries with up to eight unhealthy records.
If a resource becomes unavailable after a resolver caches a response, client software typically tries another of the IP addresses in the response.
You can't create multivalue answer alias records.
TTL (integer) --
The resource record cache time to live (TTL), in seconds. Note the following:
If you're creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
Information about the resource records to act upon.
(dict) --
Information specific to the resource record.
Value (string) -- [REQUIRED]
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the Amazon Web Services resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.
If you're creating resource records sets for a private hosted zone, note the following:
You can't create an alias resource record set in a private hosted zone to route traffic to a CloudFront distribution.
For information about creating failover resource record sets in a private hosted zone, see Configuring Failover in a Private Hosted Zone in the Amazon Route 53 Developer Guide.
HostedZoneId (string) -- [REQUIRED]
Alias resource records sets only: The value used depends on where you want to route traffic:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the hosted zone ID for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalHostedZoneId.
For edge-optimized APIs, specify the value of distributionHostedZoneId.
Amazon Virtual Private Cloud interface VPC endpoint
Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify Z2FDTNDATAQYW2.
Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference.
ELB load balancer
Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
Amazon Web Services Management Console: Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneId.
CLI: Use describe-load-balancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneId.
Global Accelerator accelerator
Specify Z2BJ6XQ5FK7U4H.
An Amazon S3 bucket configured as a static website
Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference.
Another Route 53 resource record set in your hosted zone
Specify the hosted zone ID of your hosted zone. (An alias resource record set can't reference a resource record set in a different hosted zone.)
DNSName (string) -- [REQUIRED]
Alias resource record sets only: The value that you specify depends on where you want to route queries:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the applicable domain name for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalDomainName.
For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the associated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.
Enter the API endpoint for the interface endpoint, such as vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify the domain name that CloudFront assigned when you created your distribution.
Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.
If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.
For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. You can use the following methods to get the value of the CNAME attribute:
Amazon Web Services Management Console: For information about how to get the value by using the console, see Using Custom Domains with Elastic Beanstalk in the Elastic Beanstalk Developer Guide.
Elastic Beanstalk API: Use the DescribeEnvironments action to get the value of the CNAME attribute. For more information, see DescribeEnvironments in the Elastic Beanstalk API Reference.
CLI: Use the describe-environments command to get the value of the CNAME attribute. For more information, see describe-environments in the CLI Command Reference.
ELB load balancer
Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Amazon Web Services Management Console, the ELB API, or the CLI.
Amazon Web Services Management Console: Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field. If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. If you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: DescribeLoadBalancers
Application and Network Load Balancers: DescribeLoadBalancers
CLI: Use describe-load-balancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: describe-load-balancers
Application and Network Load Balancers: describe-load-balancers
Global Accelerator accelerator
Specify the DNS name for your accelerator:
Global Accelerator API: To get the DNS name, use DescribeAccelerator.
CLI: To get the DNS name, use describe-accelerator.
Amazon S3 bucket that is configured as a static website
Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference. For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide.
Another Route 53 resource record set
Specify the value of the Name element for a resource record set in the current hosted zone.
EvaluateTargetHealth (boolean) -- [REQUIRED]
Applies only to alias, az-affinity alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets: When EvaluateTargetHealth is true, an alias resource record set inherits the health of the referenced Amazon Web Services resource, such as an ELB load balancer or another resource record set in the hosted zone.
Note the following:
CloudFront distributions
You can't set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
Elastic Beanstalk environments that have regionalized subdomains
If you specify an Elastic Beanstalk environment in DNSName and the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any.
If the environment contains a single Amazon EC2 instance, there are no special requirements.
ELB load balancers
Health checking behavior depends on the type of load balancer:
Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you set EvaluateTargetHealth to true and either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources.
Application and Network Load Balancers: If you specify an ELB Application or Network Load Balancer and you set EvaluateTargetHealth to true, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer:
For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.
A target group that has no registered targets is considered unhealthy.
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an API Gateway API. However, because API Gateway is highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
S3 buckets
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an S3 bucket. However, because S3 buckets are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
VPC interface endpoints
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
Other records in the same hosted zone
If the Amazon Web Services resource that you specify in DNSName is a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the HealthCheckId element and specify the ID of the applicable health check.
Route 53 determines whether a resource record set is healthy based on one of the following:
By periodically sending a request to the endpoint that is specified in the health check
By aggregating the status of a specified group of health checks (calculated health checks)
By determining the current state of a CloudWatch alarm (CloudWatch metric health checks)
For more information, see the following topics in the Amazon Route 53 Developer Guide:
When to Specify HealthCheckId
Specifying a value for HealthCheckId is useful only when Route 53 is choosing between two or more resource record sets to respond to a DNS query, and you want Route 53 to base the choice in part on the status of a health check. Configuring health checks makes sense only in the following configurations:
Non-alias resource record sets: You're checking the health of a group of non-alias resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A) and you specify health check IDs for all the resource record sets. If the health check status for a resource record set is healthy, Route 53 includes the record among the records that it responds to DNS queries with. If the health check status for a resource record set is unhealthy, Route 53 stops responding to DNS queries using the value for that resource record set. If the health check status for all resource record sets in the group is unhealthy, Route 53 considers all resource record sets in the group healthy and responds to DNS queries accordingly.
Alias resource record sets: You specify the following settings:
You set EvaluateTargetHealth to true for an alias resource record set in a group of resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A).
You configure the alias resource record set to route traffic to a non-alias resource record set in the same hosted zone.
You specify a health check ID for the non-alias resource record set.
If the health check status is healthy, Route 53 considers the alias resource record set to be healthy and includes the alias record among the records that it responds to DNS queries with.
If the health check status is unhealthy, Route 53 stops responding to DNS queries using the alias resource record set.
Geolocation Routing
For geolocation resource record sets, if an endpoint is unhealthy, Route 53 looks for a resource record set for the larger, associated geographic region. For example, suppose you have resource record sets for a state in the United States, for the entire United States, for North America, and a resource record set that has * for CountryCode is *, which applies to all locations. If the endpoint for the state resource record set is unhealthy, Route 53 checks for healthy resource record sets in the following order until it finds a resource record set for which the endpoint is healthy:
The United States
North America
The default resource record set
Specifying the Health Check Endpoint by Domain Name
If your health checks specify the endpoint only 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 FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets ( www.example.com).
TrafficPolicyInstanceId (string) --
When you create a traffic policy instance, Amazon Route 53 automatically creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic policy instance that Route 53 created this resource record set for.
CidrRoutingConfig (dict) --
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A LocationName with an asterisk “*” can be used to create a default CIDR record. CollectionId is still required for default record.
CollectionId (string) -- [REQUIRED]
The CIDR collection ID.
LocationName (string) -- [REQUIRED]
The CIDR collection location name.
GeoProximityLocation (dict) --
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.
AWSRegion (string) --
The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
LocalZoneGroup (string) --
Specifies an Amazon Web Services Local Zone Group.
A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is us-east-1-bue-1.
You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command:
This command returns: "GroupName": "us-west-2-den-1", specifying that the Local Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1.
Coordinates (dict) --
Contains the longitude and latitude for a geographic region.
Latitude (string) -- [REQUIRED]
Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
Longitude (string) -- [REQUIRED]
Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
Bias (integer) --
The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
To use Bias to change the size of the geographic region, specify the applicable value for the bias:
To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
AZAffinity (dict) --
AZ-affinity resource record sets only: The location that this resource record set answers DNS queries from, such as an Availability Zone (AZ) or an Amazon Web Services Region. For each query, Route 53 starts with the most specific location that the query matches and falls back to a less specific location when there's no record for that location or the record is unhealthy (its health check fails or, for an alias record that has EvaluateTargetHealth set to true, its target is unhealthy). You must also specify SetIdentifier, and you can't specify another routing policy element, such as Weight, in the same resource record set.
For more information, see AZ-affinity routing in the Amazon Route 53 Developer Guide.
LocationType (string) --
The level of the location that LocationId identifies. Valid values, from most to least specific:
AvailabilityZone: A single Availability Zone.
AvailabilityZoneGroup: A Zone Group, which is a group of Availability Zones in an Amazon Web Services Region.
Region: An entire Amazon Web Services Region.
Partition: An entire Amazon Web Services partition.
Global: All locations.
We recommend that you create a record for the Global location type so that every query gets an answer. Route 53 responds with it when a query matches no more specific record, or when it's the only healthy record that matches. Without a Global record, Route 53 returns a "no answer" response to queries that don't match any other record.
LocationId (string) --
The ID of the location. You can specify only generally available Availability Zones and Zone Groups. Zone Group, Region, and partition IDs must belong to a partition that you can use. Specify the ID in lowercase, in the format that corresponds to LocationType:
For AvailabilityZone, the Availability Zone ID (not the Availability Zone name or a Local Zone ID), such as use1-az1.
For AvailabilityZoneGroup, the Zone Group that an Availability Zone belongs to (not a Local Zone group), such as us-east-1-zg-1.
For Region, the Region code, such as us-east-1.
For Partition, the partition name, such as aws.
For Global, the value global.
dict
Response Syntax
{
'ChangeInfo': {
'Id': 'string',
'Status': 'PENDING'|'INSYNC',
'SubmittedAt': datetime(2015, 1, 1),
'Comment': 'string'
}
}
Response Structure
(dict) --
A complex type containing the response for the request.
ChangeInfo (dict) --
A complex type that contains information about changes made to your hosted zone.
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Id (string) --
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
SubmittedAt (datetime) --
The date and time that the change request was submitted in ISO 8601 format and Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC.
Comment (string) --
A comment you can provide.
{'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK | '
'NS_OCCLUSION_CHECK | ALIAS_TARGET_CHECK | '
'ACTIVE_RECORD_CHECK | ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | DISABLED'}],
'EnablePublicDNSFallback': 'boolean',
'HostedZoneConfig': {'HostedZoneTier': 'STANDARD | ADVANCED'}}
Response {'HostedZone': {'Config': {'HostedZoneTier': 'STANDARD | ADVANCED'},
'Features': {'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK '
'| '
'NS_OCCLUSION_CHECK '
'| '
'ALIAS_TARGET_CHECK '
'| '
'ACTIVE_RECORD_CHECK '
'| '
'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | '
'DISABLED'}],
'ChangeHistory': {'RetentionStartsAt': 'timestamp',
'Status': 'ENABLED | DISABLED'},
'PublicDNSFallbackStatus': 'ENABLED | DISABLED | '
'ENABLING | '
'DISABLING'}}}
Creates a new public or private hosted zone. You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs).
For more information about charges for hosted zones, see Amazon Route 53 Pricing.
Note the following:
You can't create a hosted zone for a top-level domain (TLD) such as .com.
For public hosted zones, Route 53 automatically creates a default SOA record and four NS records for the zone. For more information about SOA and NS records, see NS and SOA Records that Route 53 Creates for a Hosted Zone in the Amazon Route 53 Developer Guide. If you want to use the same name servers for multiple public hosted zones, you can optionally associate a reusable delegation set with the hosted zone. See the DelegationSetId element.
If your domain is registered with a registrar other than Route 53, you must update the name servers with your registrar to make Route 53 the DNS service for the domain. For more information, see Migrating DNS Service for an Existing Domain to Amazon Route 53 in the Amazon Route 53 Developer Guide.
When you submit a CreateHostedZone request, the initial status of the hosted zone is PENDING. For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to INSYNC.
The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs permission.
See also: AWS API Documentation
Request Syntax
client.create_hosted_zone(
Name='string',
VPC={
'VPCRegion': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-east-1'|'me-south-1'|'us-gov-west-1'|'us-gov-east-1'|'us-iso-east-1'|'us-iso-west-1'|'us-isob-east-1'|'me-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-south-1'|'ap-south-2'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'ca-central-1'|'cn-north-1'|'cn-northwest-1'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'us-isof-south-1'|'us-isof-east-1'|'ap-southeast-7'|'ap-east-2'|'eu-isoe-west-1'|'ap-southeast-6'|'us-isob-west-1'|'eusc-de-east-1',
'VPCId': 'string'
},
CallerReference='string',
HostedZoneConfig={
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
DelegationSetId='string',
EnablePublicDNSFallback=True|False,
ChangeGuardrails=[
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
)
string
[REQUIRED]
The name of the domain. Specify a fully qualified domain name, for example, www.example.com. The trailing dot is optional; Amazon Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
If you're creating a public hosted zone, this is the name you have registered with your DNS registrar. If your domain name is registered with a registrar other than Route 53, change the name servers for your domain to the set of NameServers that CreateHostedZone returns in DelegationSet.
dict
(Private hosted zones only) A complex type that contains information about the Amazon VPC that you're associating with this hosted zone.
You can specify only one Amazon VPC when you create a private hosted zone. If you are associating a VPC with a hosted zone with this request, the paramaters VPCId and VPCRegion are also required.
To associate additional Amazon VPCs with the hosted zone, use AssociateVPCWithHostedZone after you create a hosted zone.
VPCRegion (string) --
(Private hosted zones only) The region that an Amazon VPC was created in.
VPCId (string) --
(Private hosted zones only) The ID of an Amazon VPC.
string
[REQUIRED]
A unique string that identifies the request and that allows failed CreateHostedZone requests to be retried without the risk of executing the operation twice. You must use a unique CallerReference string every time you submit a CreateHostedZone request. CallerReference can be any unique string, for example, a date/time stamp.
dict
(Optional) A complex type that contains the following optional values:
For public and private hosted zones, an optional comment
For private hosted zones, an optional PrivateZone element
If you don't specify a comment or the PrivateZone element, omit HostedZoneConfig and the other elements.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
string
If you want to associate a reusable delegation set with this hosted zone, the ID that Amazon Route 53 assigned to the reusable delegation set when you created it. For more information about reusable delegation sets, see CreateReusableDelegationSet.
If you are using a reusable delegation set to create a public hosted zone for a subdomain, make sure that the parent hosted zone doesn't use one or more of the same name servers. If you have overlapping nameservers, the operation will cause a ConflictingDomainsExist error.
boolean
Specifies whether to enable public DNS fallback for the hosted zone. When public DNS fallback is enabled and a query for a domain name in the private hosted zone matches no existing name ( NXDOMAIN), Route 53 retries the query against public DNS instead of returning a negative response. Fallback does not occur when the name exists but has no record of the requested type.
Set to true to enable public DNS fallback, or false to disable it. The default is false.
Public DNS fallback is supported only for private hosted zones. If you specify true for a public hosted zone, the request fails with an InvalidInput error.
list
Specify the optional Change Guardrails to turn on for the hosted zone. Each entry specifies the name and status of a guardrail. For the guardrail names and statuses, see ChangeGuardrail.
Route 53 turns on the guardrails that the tier of the hosted zone includes, so you don't need to specify them. If you turn on a guardrail that the tier doesn't offer, Route 53 returns an InvalidInput error.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) -- [REQUIRED]
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) -- [REQUIRED]
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
dict
Response Syntax
{
'HostedZone': {
'Id': 'string',
'Name': 'string',
'CallerReference': 'string',
'Config': {
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
'ResourceRecordSetCount': 123,
'LinkedService': {
'ServicePrincipal': 'string',
'Description': 'string'
},
'Features': {
'AcceleratedRecoveryStatus': 'ENABLING'|'ENABLE_FAILED'|'ENABLING_HOSTED_ZONE_LOCKED'|'ENABLED'|'DISABLING'|'DISABLE_FAILED'|'DISABLED'|'DISABLING_HOSTED_ZONE_LOCKED',
'PublicDNSFallbackStatus': 'ENABLED'|'DISABLED'|'ENABLING'|'DISABLING',
'ChangeHistory': {
'Status': 'ENABLED'|'DISABLED',
'RetentionStartsAt': datetime(2015, 1, 1)
},
'FailureReasons': {
'AcceleratedRecovery': 'string'
},
'ChangeGuardrails': [
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
}
},
'ChangeInfo': {
'Id': 'string',
'Status': 'PENDING'|'INSYNC',
'SubmittedAt': datetime(2015, 1, 1),
'Comment': 'string'
},
'DelegationSet': {
'Id': 'string',
'CallerReference': 'string',
'NameServers': [
'string',
]
},
'VPC': {
'VPCRegion': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-east-1'|'me-south-1'|'us-gov-west-1'|'us-gov-east-1'|'us-iso-east-1'|'us-iso-west-1'|'us-isob-east-1'|'me-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-south-1'|'ap-south-2'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'ca-central-1'|'cn-north-1'|'cn-northwest-1'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'us-isof-south-1'|'us-isof-east-1'|'ap-southeast-7'|'ap-east-2'|'eu-isoe-west-1'|'ap-southeast-6'|'us-isob-west-1'|'eusc-de-east-1',
'VPCId': 'string'
},
'Location': 'string'
}
Response Structure
(dict) --
A complex type containing the response information for the hosted zone.
HostedZone (dict) --
A complex type that contains general information about the hosted zone.
Id (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
Name (string) --
The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see CreateHostedZone.
CallerReference (string) --
The value that you specified for CallerReference when you created the hosted zone.
Config (dict) --
A complex type that includes the Comment and PrivateZone elements. If you omitted the HostedZoneConfig and Comment elements from the request, the Config and Comment elements don't appear in the response.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
ResourceRecordSetCount (integer) --
The number of resource record sets in the hosted zone.
LinkedService (dict) --
If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
ServicePrincipal (string) --
If the health check or hosted zone was created by another service, the service that created the resource. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Description (string) --
If the health check or hosted zone was created by another service, an optional description that can be provided by the other service. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Features (dict) --
The features configuration for the hosted zone, including accelerated recovery settings and status information.
AcceleratedRecoveryStatus (string) --
The current status of accelerated recovery for the hosted zone.
PublicDNSFallbackStatus (string) --
The current status of public DNS fallback for the hosted zone. Valid values:
ENABLED: Public DNS fallback is enabled.
DISABLED: Public DNS fallback is disabled.
ENABLING: A request to enable public DNS fallback is still propagating.
DISABLING: A request to disable public DNS fallback is still propagating.
ChangeHistory (dict) --
The status of Change History for the hosted zone, and the earliest time from which you can read its change history.
Status (string) --
Indicates whether Change History is turned on for the hosted zone. Valid values are the following:
ENABLED: Change History is turned on for the hosted zone.
DISABLED: Change History is turned off for the hosted zone.
Route 53 turns Change History on or off when the hosted zone moves to or from a tier that includes it.
RetentionStartsAt (datetime) --
The earliest date and time from which you can read the change history of the hosted zone. Route 53 returns this value only when Status is ENABLED.
FailureReasons (dict) --
Information about any failures that occurred when attempting to enable or configure features for the hosted zone.
AcceleratedRecovery (string) --
The reason why accelerated recovery failed to be enabled or disabled for the hosted zone, if applicable.
ChangeGuardrails (list) --
The name and status of each Change Guardrail for the hosted zone. For the guardrail names and statuses, see ChangeGuardrail.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) --
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) --
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
ChangeInfo (dict) --
A complex type that contains information about the CreateHostedZone request.
Id (string) --
This element contains an ID that you use when performing a GetChange action to get detailed information about the change.
Status (string) --
The current state of the request. PENDING indicates that this request has not yet been applied to all Amazon Route 53 DNS servers.
SubmittedAt (datetime) --
The date and time that the change request was submitted in ISO 8601 format and Coordinated Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC.
Comment (string) --
A comment you can provide.
DelegationSet (dict) --
A complex type that describes the name servers for this hosted zone.
Id (string) --
The ID that Amazon Route 53 assigns to a reusable delegation set.
CallerReference (string) --
The value that you specified for CallerReference when you created the reusable delegation set.
NameServers (list) --
A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
(string) --
VPC (dict) --
A complex type that contains information about an Amazon VPC that you associated with this hosted zone.
VPCRegion (string) --
(Private hosted zones only) The region that an Amazon VPC was created in.
VPCId (string) --
(Private hosted zones only) The ID of an Amazon VPC.
Location (string) --
The unique URL representing the new hosted zone.
{'HostedZone': {'Config': {'HostedZoneTier': 'STANDARD | ADVANCED'},
'Features': {'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK '
'| '
'NS_OCCLUSION_CHECK '
'| '
'ALIAS_TARGET_CHECK '
'| '
'ACTIVE_RECORD_CHECK '
'| '
'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | '
'DISABLED'}],
'ChangeHistory': {'RetentionStartsAt': 'timestamp',
'Status': 'ENABLED | DISABLED'},
'PublicDNSFallbackStatus': 'ENABLED | DISABLED | '
'ENABLING | '
'DISABLING'}}}
Gets information about a specified hosted zone including the four name servers assigned to the hosted zone.
returns the VPCs associated with the specified hosted zone and does not reflect the VPC associations by Route 53 Profiles. To get the associations to a Profile, call the ListProfileAssociations API.
See also: AWS API Documentation
Request Syntax
client.get_hosted_zone(
Id='string'
)
string
[REQUIRED]
The ID of the hosted zone that you want to get information about.
dict
Response Syntax
{
'HostedZone': {
'Id': 'string',
'Name': 'string',
'CallerReference': 'string',
'Config': {
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
'ResourceRecordSetCount': 123,
'LinkedService': {
'ServicePrincipal': 'string',
'Description': 'string'
},
'Features': {
'AcceleratedRecoveryStatus': 'ENABLING'|'ENABLE_FAILED'|'ENABLING_HOSTED_ZONE_LOCKED'|'ENABLED'|'DISABLING'|'DISABLE_FAILED'|'DISABLED'|'DISABLING_HOSTED_ZONE_LOCKED',
'PublicDNSFallbackStatus': 'ENABLED'|'DISABLED'|'ENABLING'|'DISABLING',
'ChangeHistory': {
'Status': 'ENABLED'|'DISABLED',
'RetentionStartsAt': datetime(2015, 1, 1)
},
'FailureReasons': {
'AcceleratedRecovery': 'string'
},
'ChangeGuardrails': [
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
}
},
'DelegationSet': {
'Id': 'string',
'CallerReference': 'string',
'NameServers': [
'string',
]
},
'VPCs': [
{
'VPCRegion': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-east-1'|'me-south-1'|'us-gov-west-1'|'us-gov-east-1'|'us-iso-east-1'|'us-iso-west-1'|'us-isob-east-1'|'me-central-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-south-1'|'ap-south-2'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'ca-central-1'|'cn-north-1'|'cn-northwest-1'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'us-isof-south-1'|'us-isof-east-1'|'ap-southeast-7'|'ap-east-2'|'eu-isoe-west-1'|'ap-southeast-6'|'us-isob-west-1'|'eusc-de-east-1',
'VPCId': 'string'
},
]
}
Response Structure
(dict) --
A complex type that contain the response to a GetHostedZone request.
HostedZone (dict) --
A complex type that contains general information about the specified hosted zone.
Id (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
Name (string) --
The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see CreateHostedZone.
CallerReference (string) --
The value that you specified for CallerReference when you created the hosted zone.
Config (dict) --
A complex type that includes the Comment and PrivateZone elements. If you omitted the HostedZoneConfig and Comment elements from the request, the Config and Comment elements don't appear in the response.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
ResourceRecordSetCount (integer) --
The number of resource record sets in the hosted zone.
LinkedService (dict) --
If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
ServicePrincipal (string) --
If the health check or hosted zone was created by another service, the service that created the resource. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Description (string) --
If the health check or hosted zone was created by another service, an optional description that can be provided by the other service. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Features (dict) --
The features configuration for the hosted zone, including accelerated recovery settings and status information.
AcceleratedRecoveryStatus (string) --
The current status of accelerated recovery for the hosted zone.
PublicDNSFallbackStatus (string) --
The current status of public DNS fallback for the hosted zone. Valid values:
ENABLED: Public DNS fallback is enabled.
DISABLED: Public DNS fallback is disabled.
ENABLING: A request to enable public DNS fallback is still propagating.
DISABLING: A request to disable public DNS fallback is still propagating.
ChangeHistory (dict) --
The status of Change History for the hosted zone, and the earliest time from which you can read its change history.
Status (string) --
Indicates whether Change History is turned on for the hosted zone. Valid values are the following:
ENABLED: Change History is turned on for the hosted zone.
DISABLED: Change History is turned off for the hosted zone.
Route 53 turns Change History on or off when the hosted zone moves to or from a tier that includes it.
RetentionStartsAt (datetime) --
The earliest date and time from which you can read the change history of the hosted zone. Route 53 returns this value only when Status is ENABLED.
FailureReasons (dict) --
Information about any failures that occurred when attempting to enable or configure features for the hosted zone.
AcceleratedRecovery (string) --
The reason why accelerated recovery failed to be enabled or disabled for the hosted zone, if applicable.
ChangeGuardrails (list) --
The name and status of each Change Guardrail for the hosted zone. For the guardrail names and statuses, see ChangeGuardrail.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) --
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) --
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
DelegationSet (dict) --
A complex type that lists the Amazon Route 53 name servers for the specified hosted zone.
Id (string) --
The ID that Amazon Route 53 assigns to a reusable delegation set.
CallerReference (string) --
The value that you specified for CallerReference when you created the reusable delegation set.
NameServers (list) --
A complex type that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.
(string) --
VPCs (list) --
A complex type that contains information about the VPCs that are associated with the specified hosted zone.
(dict) --
(Private hosted zones only) A complex type that contains information about an Amazon VPC.
If you associate a private hosted zone with an Amazon VPC when you make a CreateHostedZone request, the following parameters are also required.
VPCRegion (string) --
(Private hosted zones only) The region that an Amazon VPC was created in.
VPCId (string) --
(Private hosted zones only) The ID of an Amazon VPC.
{'HostedZones': {'Config': {'HostedZoneTier': 'STANDARD | ADVANCED'},
'Features': {'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK '
'| '
'NS_OCCLUSION_CHECK '
'| '
'ALIAS_TARGET_CHECK '
'| '
'ACTIVE_RECORD_CHECK '
'| '
'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | '
'DISABLED'}],
'ChangeHistory': {'RetentionStartsAt': 'timestamp',
'Status': 'ENABLED | DISABLED'},
'PublicDNSFallbackStatus': 'ENABLED | DISABLED | '
'ENABLING | '
'DISABLING'}}}
Retrieves a list of the public and private hosted zones that are associated with the current Amazon Web Services account. The response includes a HostedZones child element for each hosted zone.
Amazon Route 53 returns a maximum of 100 items in each response. If you have a lot of hosted zones, you can use the maxitems parameter to list them in groups of up to 100.
See also: AWS API Documentation
Request Syntax
client.list_hosted_zones(
Marker='string',
MaxItems='string',
DelegationSetId='string',
HostedZoneType='PrivateHostedZone'
)
string
If the value of IsTruncated in the previous response was true, you have more hosted zones. To get more hosted zones, submit another ListHostedZones request.
For the value of marker, specify the value of NextMarker from the previous response, which is the ID of the first hosted zone that Amazon Route 53 will return if you submit another request.
If the value of IsTruncated in the previous response was false, there are no more hosted zones to get.
string
(Optional) The maximum number of hosted zones that you want Amazon Route 53 to return. If you have more than maxitems hosted zones, the value of IsTruncated in the response is true, and the value of NextMarker is the hosted zone ID of the first hosted zone that Route 53 will return if you submit another request.
string
If you're using reusable delegation sets and you want to list all of the hosted zones that are associated with a reusable delegation set, specify the ID of that reusable delegation set.
string
(Optional) Specifies if the hosted zone is private.
dict
Response Syntax
{
'HostedZones': [
{
'Id': 'string',
'Name': 'string',
'CallerReference': 'string',
'Config': {
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
'ResourceRecordSetCount': 123,
'LinkedService': {
'ServicePrincipal': 'string',
'Description': 'string'
},
'Features': {
'AcceleratedRecoveryStatus': 'ENABLING'|'ENABLE_FAILED'|'ENABLING_HOSTED_ZONE_LOCKED'|'ENABLED'|'DISABLING'|'DISABLE_FAILED'|'DISABLED'|'DISABLING_HOSTED_ZONE_LOCKED',
'PublicDNSFallbackStatus': 'ENABLED'|'DISABLED'|'ENABLING'|'DISABLING',
'ChangeHistory': {
'Status': 'ENABLED'|'DISABLED',
'RetentionStartsAt': datetime(2015, 1, 1)
},
'FailureReasons': {
'AcceleratedRecovery': 'string'
},
'ChangeGuardrails': [
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
}
},
],
'Marker': 'string',
'IsTruncated': True|False,
'NextMarker': 'string',
'MaxItems': 'string'
}
Response Structure
(dict) --
HostedZones (list) --
A complex type that contains general information about the hosted zone.
(dict) --
A complex type that contains general information about the hosted zone.
Id (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
Name (string) --
The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see CreateHostedZone.
CallerReference (string) --
The value that you specified for CallerReference when you created the hosted zone.
Config (dict) --
A complex type that includes the Comment and PrivateZone elements. If you omitted the HostedZoneConfig and Comment elements from the request, the Config and Comment elements don't appear in the response.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
ResourceRecordSetCount (integer) --
The number of resource record sets in the hosted zone.
LinkedService (dict) --
If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
ServicePrincipal (string) --
If the health check or hosted zone was created by another service, the service that created the resource. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Description (string) --
If the health check or hosted zone was created by another service, an optional description that can be provided by the other service. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Features (dict) --
The features configuration for the hosted zone, including accelerated recovery settings and status information.
AcceleratedRecoveryStatus (string) --
The current status of accelerated recovery for the hosted zone.
PublicDNSFallbackStatus (string) --
The current status of public DNS fallback for the hosted zone. Valid values:
ENABLED: Public DNS fallback is enabled.
DISABLED: Public DNS fallback is disabled.
ENABLING: A request to enable public DNS fallback is still propagating.
DISABLING: A request to disable public DNS fallback is still propagating.
ChangeHistory (dict) --
The status of Change History for the hosted zone, and the earliest time from which you can read its change history.
Status (string) --
Indicates whether Change History is turned on for the hosted zone. Valid values are the following:
ENABLED: Change History is turned on for the hosted zone.
DISABLED: Change History is turned off for the hosted zone.
Route 53 turns Change History on or off when the hosted zone moves to or from a tier that includes it.
RetentionStartsAt (datetime) --
The earliest date and time from which you can read the change history of the hosted zone. Route 53 returns this value only when Status is ENABLED.
FailureReasons (dict) --
Information about any failures that occurred when attempting to enable or configure features for the hosted zone.
AcceleratedRecovery (string) --
The reason why accelerated recovery failed to be enabled or disabled for the hosted zone, if applicable.
ChangeGuardrails (list) --
The name and status of each Change Guardrail for the hosted zone. For the guardrail names and statuses, see ChangeGuardrail.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) --
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) --
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
Marker (string) --
For the second and subsequent calls to ListHostedZones, Marker is the value that you specified for the marker parameter in the request that produced the current response.
IsTruncated (boolean) --
A flag indicating whether there are more hosted zones to be listed. If the response was truncated, you can get more hosted zones by submitting another ListHostedZones request and specifying the value of NextMarker in the marker parameter.
NextMarker (string) --
If IsTruncated is true, the value of NextMarker identifies the first hosted zone in the next group of hosted zones. Submit another ListHostedZones request, and specify the value of NextMarker from the response in the marker parameter.
This element is present only if IsTruncated is true.
MaxItems (string) --
The value that you specified for the maxitems parameter in the call to ListHostedZones that produced the current response.
{'HostedZones': {'Config': {'HostedZoneTier': 'STANDARD | ADVANCED'},
'Features': {'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK '
'| '
'NS_OCCLUSION_CHECK '
'| '
'ALIAS_TARGET_CHECK '
'| '
'ACTIVE_RECORD_CHECK '
'| '
'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | '
'DISABLED'}],
'ChangeHistory': {'RetentionStartsAt': 'timestamp',
'Status': 'ENABLED | DISABLED'},
'PublicDNSFallbackStatus': 'ENABLED | DISABLED | '
'ENABLING | '
'DISABLING'}}}
Retrieves a list of your hosted zones in lexicographic order. The response includes a HostedZones child element for each hosted zone created by the current Amazon Web Services account.
ListHostedZonesByName sorts hosted zones by name with the labels reversed. For example:
com.example.www.
Note the trailing dot, which can change the sort order in some circumstances.
If the domain name includes escape characters or Punycode, ListHostedZonesByName alphabetizes the domain name using the escaped or Punycoded value, which is the format that Amazon Route 53 saves in its database. For example, to create a hosted zone for exämple.com, you specify ex344mple.com for the domain name. ListHostedZonesByName alphabetizes it as:
com.ex\344mple.
The labels are reversed and alphabetized using the escaped value. For more information about valid domain name formats, including internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.
Route 53 returns up to 100 items in each response. If you have a lot of hosted zones, use the MaxItems parameter to list them in groups of up to 100. The response includes values that help navigate from one group of MaxItems hosted zones to the next:
The DNSName and HostedZoneId elements in the response contain the values, if any, specified for the dnsname and hostedzoneid parameters in the request that produced the current response.
The MaxItems element in the response contains the value, if any, that you specified for the maxitems parameter in the request that produced the current response.
If the value of IsTruncated in the response is true, there are more hosted zones associated with the current Amazon Web Services account. If IsTruncated is false, this response includes the last hosted zone that is associated with the current account. The NextDNSName element and NextHostedZoneId elements are omitted from the response.
The NextDNSName and NextHostedZoneId elements in the response contain the domain name and the hosted zone ID of the next hosted zone that is associated with the current Amazon Web Services account. If you want to list more hosted zones, make another call to ListHostedZonesByName, and specify the value of NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively.
See also: AWS API Documentation
Request Syntax
client.list_hosted_zones_by_name(
DNSName='string',
HostedZoneId='string',
MaxItems='string'
)
string
(Optional) For your first request to ListHostedZonesByName, include the dnsname parameter only if you want to specify the name of the first hosted zone in the response. If you don't include the dnsname parameter, Amazon Route 53 returns all of the hosted zones that were created by the current Amazon Web Services account, in ASCII order. For subsequent requests, include both dnsname and hostedzoneid parameters. For dnsname, specify the value of NextDNSName from the previous response.
string
(Optional) For your first request to ListHostedZonesByName, do not include the hostedzoneid parameter.
If you have more hosted zones than the value of maxitems, ListHostedZonesByName returns only the first maxitems hosted zones. To get the next group of maxitems hosted zones, submit another request to ListHostedZonesByName and include both dnsname and hostedzoneid parameters. For the value of hostedzoneid, specify the value of the NextHostedZoneId element from the previous response.
string
The maximum number of hosted zones to be included in the response body for this request. If you have more than maxitems hosted zones, then the value of the IsTruncated element in the response is true, and the values of NextDNSName and NextHostedZoneId specify the first hosted zone in the next group of maxitems hosted zones.
dict
Response Syntax
{
'HostedZones': [
{
'Id': 'string',
'Name': 'string',
'CallerReference': 'string',
'Config': {
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
'ResourceRecordSetCount': 123,
'LinkedService': {
'ServicePrincipal': 'string',
'Description': 'string'
},
'Features': {
'AcceleratedRecoveryStatus': 'ENABLING'|'ENABLE_FAILED'|'ENABLING_HOSTED_ZONE_LOCKED'|'ENABLED'|'DISABLING'|'DISABLE_FAILED'|'DISABLED'|'DISABLING_HOSTED_ZONE_LOCKED',
'PublicDNSFallbackStatus': 'ENABLED'|'DISABLED'|'ENABLING'|'DISABLING',
'ChangeHistory': {
'Status': 'ENABLED'|'DISABLED',
'RetentionStartsAt': datetime(2015, 1, 1)
},
'FailureReasons': {
'AcceleratedRecovery': 'string'
},
'ChangeGuardrails': [
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
}
},
],
'DNSName': 'string',
'HostedZoneId': 'string',
'IsTruncated': True|False,
'NextDNSName': 'string',
'NextHostedZoneId': 'string',
'MaxItems': 'string'
}
Response Structure
(dict) --
A complex type that contains the response information for the request.
HostedZones (list) --
A complex type that contains general information about the hosted zone.
(dict) --
A complex type that contains general information about the hosted zone.
Id (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
Name (string) --
The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see CreateHostedZone.
CallerReference (string) --
The value that you specified for CallerReference when you created the hosted zone.
Config (dict) --
A complex type that includes the Comment and PrivateZone elements. If you omitted the HostedZoneConfig and Comment elements from the request, the Config and Comment elements don't appear in the response.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
ResourceRecordSetCount (integer) --
The number of resource record sets in the hosted zone.
LinkedService (dict) --
If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
ServicePrincipal (string) --
If the health check or hosted zone was created by another service, the service that created the resource. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Description (string) --
If the health check or hosted zone was created by another service, an optional description that can be provided by the other service. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Features (dict) --
The features configuration for the hosted zone, including accelerated recovery settings and status information.
AcceleratedRecoveryStatus (string) --
The current status of accelerated recovery for the hosted zone.
PublicDNSFallbackStatus (string) --
The current status of public DNS fallback for the hosted zone. Valid values:
ENABLED: Public DNS fallback is enabled.
DISABLED: Public DNS fallback is disabled.
ENABLING: A request to enable public DNS fallback is still propagating.
DISABLING: A request to disable public DNS fallback is still propagating.
ChangeHistory (dict) --
The status of Change History for the hosted zone, and the earliest time from which you can read its change history.
Status (string) --
Indicates whether Change History is turned on for the hosted zone. Valid values are the following:
ENABLED: Change History is turned on for the hosted zone.
DISABLED: Change History is turned off for the hosted zone.
Route 53 turns Change History on or off when the hosted zone moves to or from a tier that includes it.
RetentionStartsAt (datetime) --
The earliest date and time from which you can read the change history of the hosted zone. Route 53 returns this value only when Status is ENABLED.
FailureReasons (dict) --
Information about any failures that occurred when attempting to enable or configure features for the hosted zone.
AcceleratedRecovery (string) --
The reason why accelerated recovery failed to be enabled or disabled for the hosted zone, if applicable.
ChangeGuardrails (list) --
The name and status of each Change Guardrail for the hosted zone. For the guardrail names and statuses, see ChangeGuardrail.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) --
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) --
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
DNSName (string) --
For the second and subsequent calls to ListHostedZonesByName, DNSName is the value that you specified for the dnsname parameter in the request that produced the current response.
HostedZoneId (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
IsTruncated (boolean) --
A flag that indicates whether there are more hosted zones to be listed. If the response was truncated, you can get the next group of maxitems hosted zones by calling ListHostedZonesByName again and specifying the values of NextDNSName and NextHostedZoneId elements in the dnsname and hostedzoneid parameters.
NextDNSName (string) --
If IsTruncated is true, the value of NextDNSName is the name of the first hosted zone in the next group of maxitems hosted zones. Call ListHostedZonesByName again and specify the value of NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively.
This element is present only if IsTruncated is true.
NextHostedZoneId (string) --
If IsTruncated is true, the value of NextHostedZoneId identifies the first hosted zone in the next group of maxitems hosted zones. Call ListHostedZonesByName again and specify the value of NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively.
This element is present only if IsTruncated is true.
MaxItems (string) --
The value that you specified for the maxitems parameter in the call to ListHostedZonesByName that produced the current response.
{'ResourceRecordSets': {'AZAffinity': {'LocationId': 'string',
'LocationType': 'AvailabilityZone | '
'AvailabilityZoneGroup '
'| Region | Partition | '
'Global'}}}
Lists the resource record sets in a specified hosted zone.
ListResourceRecordSets returns up to 300 resource record sets at a time in ASCII order, beginning at a position specified by the name and type elements.
Sort order
ListResourceRecordSets sorts results first by DNS name with the labels reversed, for example:
com.example.www.
Note the trailing dot, which can change the sort order when the record name contains characters that appear before . (decimal 46) in the ASCII table. These characters include the following: ! " # $ % & ' ( ) * + , -
When multiple records have the same DNS name, ListResourceRecordSets sorts results by the record type.
Specifying where to start listing records
You can use the name and type elements to specify the resource record set that the list begins with:
If you do not specify Name or Type
The results begin with the first resource record set that the hosted zone contains.
If you specify Name but not Type
The results begin with the first resource record set in the list whose name is greater than or equal to Name.
If you specify Type but not Name
Amazon Route 53 returns the InvalidInput error.
If you specify both Name and Type
The results begin with the first resource record set in the list whose name is greater than or equal to Name, and whose type is greater than or equal to Type.
Resource record sets that are PENDING
This action returns the most current version of the records. This includes records that are PENDING, and that are not yet available on all Route 53 DNS servers.
Changing resource record sets
To ensure that you get an accurate listing of the resource record sets for a hosted zone at a point in time, do not submit a ChangeResourceRecordSets request while you're paging through the results of a ListResourceRecordSets request. If you do, some pages may display results without the latest changes while other pages display results with the latest changes.
Displaying the next page of results
If a ListResourceRecordSets command returns more than one page of results, the value of IsTruncated is true. To display the next page of results, get the values of NextRecordName, NextRecordType, and NextRecordIdentifier (if any) from the response. Then submit another ListResourceRecordSets request, and specify those values for StartRecordName, StartRecordType, and StartRecordIdentifier.
See also: AWS API Documentation
Request Syntax
client.list_resource_record_sets(
HostedZoneId='string',
StartRecordName='string',
StartRecordType='SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
StartRecordIdentifier='string',
MaxItems='string'
)
string
[REQUIRED]
The ID of the hosted zone that contains the resource record sets that you want to list.
string
The first name in the lexicographic ordering of resource record sets that you want to list. If the specified record name doesn't exist, the results begin with the first resource record set that has a name greater than the value of name.
string
The type of resource record set to begin the record listing from.
Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT
Values for alias resource record sets:
API Gateway custom regional API or edge-optimized API: A
CloudFront distribution: A or AAAA
Elastic Beanstalk environment that has a regionalized subdomain: A
Elastic Load Balancing load balancer: A | AAAA
S3 bucket: A
VPC interface VPC endpoint: A
Another resource record set in this hosted zone: The type of the resource record set that the alias references.
Constraint: Specifying type without specifying name returns an InvalidInput error.
string
Resource record sets that have a routing policy other than simple: If results were truncated for a given DNS name and type, specify the value of NextRecordIdentifier from the previous response to get the next resource record set that has the current DNS name and type.
string
(Optional) The maximum number of resource records sets to include in the response body for this request. If the response includes more than maxitems resource record sets, the value of the IsTruncated element in the response is true, and the values of the NextRecordName and NextRecordType elements in the response identify the first resource record set in the next group of maxitems resource record sets.
dict
Response Syntax
{
'ResourceRecordSets': [
{
'Name': 'string',
'Type': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
'SetIdentifier': 'string',
'Weight': 123,
'Region': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'ca-central-1'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'eu-central-2'|'ap-southeast-1'|'ap-southeast-2'|'ap-southeast-3'|'ap-northeast-1'|'ap-northeast-2'|'ap-northeast-3'|'eu-north-1'|'sa-east-1'|'cn-north-1'|'cn-northwest-1'|'ap-east-1'|'me-south-1'|'me-central-1'|'ap-south-1'|'ap-south-2'|'af-south-1'|'eu-south-1'|'eu-south-2'|'ap-southeast-4'|'il-central-1'|'ca-west-1'|'ap-southeast-5'|'mx-central-1'|'ap-southeast-7'|'us-gov-east-1'|'us-gov-west-1'|'ap-east-2'|'ap-southeast-6'|'eusc-de-east-1',
'GeoLocation': {
'ContinentCode': 'string',
'CountryCode': 'string',
'SubdivisionCode': 'string'
},
'Failover': 'PRIMARY'|'SECONDARY',
'MultiValueAnswer': True|False,
'TTL': 123,
'ResourceRecords': [
{
'Value': 'string'
},
],
'AliasTarget': {
'HostedZoneId': 'string',
'DNSName': 'string',
'EvaluateTargetHealth': True|False
},
'HealthCheckId': 'string',
'TrafficPolicyInstanceId': 'string',
'CidrRoutingConfig': {
'CollectionId': 'string',
'LocationName': 'string'
},
'GeoProximityLocation': {
'AWSRegion': 'string',
'LocalZoneGroup': 'string',
'Coordinates': {
'Latitude': 'string',
'Longitude': 'string'
},
'Bias': 123
},
'AZAffinity': {
'LocationType': 'AvailabilityZone'|'AvailabilityZoneGroup'|'Region'|'Partition'|'Global',
'LocationId': 'string'
}
},
],
'IsTruncated': True|False,
'NextRecordName': 'string',
'NextRecordType': 'SOA'|'A'|'TXT'|'NS'|'CNAME'|'MX'|'NAPTR'|'PTR'|'SRV'|'SPF'|'AAAA'|'CAA'|'DS'|'TLSA'|'SSHFP'|'SVCB'|'HTTPS',
'NextRecordIdentifier': 'string',
'MaxItems': 'string'
}
Response Structure
(dict) --
A complex type that contains list information for the resource record set.
ResourceRecordSets (list) --
Information about multiple resource record sets.
(dict) --
Information about the resource record set to create or delete.
Name (string) --
For ChangeResourceRecordSets requests, the name of the record that you want to create, update, or delete. For ListResourceRecordSets responses, the name of a record in the specified hosted zone.
ChangeResourceRecordSets Only
Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see DNS Domain Name Format in the Amazon Route 53 Developer Guide.
You can use the asterisk (*) wildcard to replace the leftmost label in a domain name, for example, *.example.com. Note the following:
The * must replace the entire label. For example, you can't specify *prod.example.com or prod*.example.com.
The * can't replace any of the middle labels, for example, marketing.*.example.com.
If you include * in any position other than the leftmost label in a domain name, DNS treats it as an * character (ASCII 42), not as a wildcard.
Type (string) --
The DNS record type. For information about different record types and how data is encoded for them, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | NAPTR | NS | PTR | SOA | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for weighted, latency, geolocation, and failover resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS. When creating a group of weighted, latency, geolocation, or failover resource record sets, specify the same value for all of the resource record sets in the group.
Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR | PTR | SPF | SRV | TXT``| ``CAA``| ``TLSA``| ``SSHFP``| ``SVCB``| ``HTTPS
Values for alias resource record sets:
Amazon API Gateway custom regional APIs and edge-optimized APIs: A
CloudFront distributions: A If IPv6 is enabled for the distribution, create two resource record sets to route traffic to your distribution, one with a value of A and one with a value of AAAA.
Amazon API Gateway environment that has a regionalized subdomain: A
ELB load balancers: A | AAAA
Amazon S3 buckets: A
Amazon Virtual Private Cloud interface VPC endpoints A
Another resource record set in this hosted zone: Specify the type of the resource record set that you're creating the alias for. All values are supported except NS and SOA.
SetIdentifier (string) --
Resource record sets that have a routing policy other than simple: An identifier that differentiates among multiple resource record sets that have the same combination of name and type, such as multiple weighted resource record sets named acme.example.com that have a type of A. In a group of resource record sets that have the same name and type, the value of SetIdentifier must be unique for each resource record set.
For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.
Weight (integer) --
Weighted resource record sets only: Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set. Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total. Note the following:
You must specify a value for the Weight element for every weighted resource record set.
You can only specify one ResourceRecord per weighted resource record set.
You can't create latency, failover, or geolocation resource record sets that have the same values for the Name and Type elements as weighted resource record sets.
You can create a maximum of 100 weighted resource record sets that have the same values for the Name and Type elements.
For weighted (but not weighted alias) resource record sets, if you set Weight to 0 for a resource record set, Route 53 never responds to queries with the applicable value for that resource record set. However, if you set Weight to 0 for all resource record sets that have the same combination of DNS name and type, traffic is routed to all resources with equal probability. The effect of setting Weight to 0 is different when you associate health checks with weighted resource record sets. For more information, see Options for Configuring Route 53 Active-Active and Active-Passive Failover in the Amazon Route 53 Developer Guide.
Region (string) --
Latency-based resource record sets only: The Amazon EC2 Region where you created the resource that this resource record set refers to. The resource typically is an Amazon Web Services resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.
When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.
Note the following:
You can only specify one ResourceRecord per latency resource record set.
You can only create one latency resource record set for each Amazon EC2 Region.
You aren't required to create latency resource record sets for all Amazon EC2 Regions. Route 53 will choose the region with the best latency from among the regions that you create latency resource record sets for.
You can't create non-latency resource record sets that have the same values for the Name and Type elements as latency resource record sets.
GeoLocation (dict) --
Geolocation resource record sets only: A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query. For example, if you want all queries from Africa to be routed to a web server with an IP address of 192.0.2.111, create a resource record set with a Type of A and a ContinentCode of AF.
If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent), priority goes to the smallest geographic region. This allows you to route most queries for a continent to one resource and to route queries for a country on that continent to a different resource.
You can't create two geolocation resource record sets that specify the same geographic location.
The value * in the CountryCode element matches all geographic locations that aren't specified in other geolocation resource record sets that have the same values for the Name and Type elements.
You can't create non-geolocation resource record sets that have the same values for the Name and Type elements as geolocation resource record sets.
ContinentCode (string) --
The two-letter code for the continent.
Amazon Route 53 supports the following continent codes:
AF: Africa
AN: Antarctica
AS: Asia
EU: Europe
OC: Oceania
NA: North America
SA: South America
Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode returns an InvalidInput error.
CountryCode (string) --
For geolocation resource record sets, the two-letter code for a country.
Amazon Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2.
Route 53 also supports the country code UA for Ukraine.
SubdivisionCode (string) --
For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn't support any other values for SubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website.
If you specify subdivisioncode, you must also specify US for CountryCode.
Failover (string) --
Failover resource record sets only: To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY. In addition, you include the HealthCheckId element and specify the health check that you want Amazon Route 53 to perform for each resource record set.
Except where noted, the following failover behaviors assume that you have included the HealthCheckId element in both resource record sets:
When the primary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the secondary resource record set.
When the primary resource record set is unhealthy and the secondary resource record set is healthy, Route 53 responds to DNS queries with the applicable value from the secondary resource record set.
When the secondary resource record set is unhealthy, Route 53 responds to DNS queries with the applicable value from the primary resource record set regardless of the health of the primary resource record set.
If you omit the HealthCheckId element for the secondary resource record set, and if the primary resource record set is unhealthy, Route 53 always responds to DNS queries with the applicable value from the secondary resource record set. This is true regardless of the health of the associated endpoint.
You can't create non-failover resource record sets that have the same values for the Name and Type elements as failover resource record sets.
For failover alias resource record sets, you must also include the EvaluateTargetHealth element and set the value to true.
For more information about configuring failover for Route 53, see the following topics in the Amazon Route 53 Developer Guide:
MultiValueAnswer (boolean) --
Multivalue answer resource record sets only: To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specify true for MultiValueAnswer. Note the following:
If you associate a health check with a multivalue answer resource record set, Amazon Route 53 responds to DNS queries with the corresponding IP address only when the health check is healthy.
If you don't associate a health check with a multivalue answer record, Route 53 always considers the record to be healthy.
Route 53 responds to DNS queries with up to eight healthy records; if you have eight or fewer healthy records, Route 53 responds to all DNS queries with all the healthy records.
If you have more than eight healthy records, Route 53 responds to different DNS resolvers with different combinations of healthy records.
When all records are unhealthy, Route 53 responds to DNS queries with up to eight unhealthy records.
If a resource becomes unavailable after a resolver caches a response, client software typically tries another of the IP addresses in the response.
You can't create multivalue answer alias records.
TTL (integer) --
The resource record cache time to live (TTL), in seconds. Note the following:
If you're creating or updating an alias resource record set, omit TTL. Amazon Route 53 uses the value of TTL for the alias target.
If you're associating this resource record set with a health check (if you're adding a HealthCheckId element), we recommend that you specify a TTL of 60 seconds or less so clients respond quickly to changes in health status.
All of the resource record sets in a group of weighted resource record sets must have the same value for TTL.
If a group of weighted resource record sets includes one or more weighted alias resource record sets for which the alias target is an ELB load balancer, we recommend that you specify a TTL of 60 seconds for all of the non-alias weighted resource record sets that have the same name and type. Values other than 60 seconds (the TTL for load balancers) will change the effect of the values that you specify for Weight.
ResourceRecords (list) --
Information about the resource records to act upon.
(dict) --
Information specific to the resource record.
Value (string) --
The current or new DNS record value, not to exceed 4,000 characters. In the case of a DELETE action, if the current value does not match the actual value, an error is returned. For descriptions about how to format Value for different record types, see Supported DNS Resource Record Types in the Amazon Route 53 Developer Guide.
You can specify more than one value for all record types except CNAME and SOA.
AliasTarget (dict) --
Alias resource record sets only: Information about the Amazon Web Services resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.
If you're creating resource records sets for a private hosted zone, note the following:
You can't create an alias resource record set in a private hosted zone to route traffic to a CloudFront distribution.
For information about creating failover resource record sets in a private hosted zone, see Configuring Failover in a Private Hosted Zone in the Amazon Route 53 Developer Guide.
HostedZoneId (string) --
Alias resource records sets only: The value used depends on where you want to route traffic:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the hosted zone ID for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalHostedZoneId.
For edge-optimized APIs, specify the value of distributionHostedZoneId.
Amazon Virtual Private Cloud interface VPC endpoint
Specify the hosted zone ID for your interface endpoint. You can get the value of HostedZoneId using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify Z2FDTNDATAQYW2.
Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference.
ELB load balancer
Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
Elastic Load Balancing endpoints and quotas topic in the Amazon Web Services General Reference: Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
Amazon Web Services Management Console: Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of CanonicalHostedZoneId.
CLI: Use describe-load-balancers to get the applicable value. For more information, see the applicable guide:
Classic Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneNameId.
Application and Network Load Balancers: Use describe-load-balancers to get the value of CanonicalHostedZoneId.
Global Accelerator accelerator
Specify Z2BJ6XQ5FK7U4H.
An Amazon S3 bucket configured as a static website
Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference.
Another Route 53 resource record set in your hosted zone
Specify the hosted zone ID of your hosted zone. (An alias resource record set can't reference a resource record set in a different hosted zone.)
DNSName (string) --
Alias resource record sets only: The value that you specify depends on where you want to route queries:
Amazon API Gateway custom regional APIs and edge-optimized APIs
Specify the applicable domain name for your API. You can get the applicable value using the CLI command get-domain-names:
For regional APIs, specify the value of regionalDomainName.
For edge-optimized APIs, specify the value of distributionDomainName. This is the name of the associated CloudFront distribution, such as da1b2c3d4e5.cloudfront.net.
Enter the API endpoint for the interface endpoint, such as vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value of DnsName using the CLI command describe-vpc-endpoints.
CloudFront distribution
Specify the domain name that CloudFront assigned when you created your distribution.
Your CloudFront distribution must include an alternate domain name that matches the name of the resource record set. For example, if the name of the resource record set is acme.example.com, your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide.
You can't create a resource record set in a private hosted zone to route traffic to a CloudFront distribution.
If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized domain name.
For Elastic Beanstalk environments that have regionalized subdomains, specify the CNAME attribute for the environment. You can use the following methods to get the value of the CNAME attribute:
Amazon Web Services Management Console: For information about how to get the value by using the console, see Using Custom Domains with Elastic Beanstalk in the Elastic Beanstalk Developer Guide.
Elastic Beanstalk API: Use the DescribeEnvironments action to get the value of the CNAME attribute. For more information, see DescribeEnvironments in the Elastic Beanstalk API Reference.
CLI: Use the describe-environments command to get the value of the CNAME attribute. For more information, see describe-environments in the CLI Command Reference.
ELB load balancer
Specify the DNS name that is associated with the load balancer. Get the DNS name by using the Amazon Web Services Management Console, the ELB API, or the CLI.
Amazon Web Services Management Console: Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field. If you're routing traffic to a Classic Load Balancer, get the value that begins with dualstack. If you're routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.
Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: DescribeLoadBalancers
Application and Network Load Balancers: DescribeLoadBalancers
CLI: Use describe-load-balancers to get the value of DNSName. For more information, see the applicable guide:
Classic Load Balancers: describe-load-balancers
Application and Network Load Balancers: describe-load-balancers
Global Accelerator accelerator
Specify the DNS name for your accelerator:
Global Accelerator API: To get the DNS name, use DescribeAccelerator.
CLI: To get the DNS name, use describe-accelerator.
Amazon S3 bucket that is configured as a static website
Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example, s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference. For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide.
Another Route 53 resource record set
Specify the value of the Name element for a resource record set in the current hosted zone.
EvaluateTargetHealth (boolean) --
Applies only to alias, az-affinity alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets: When EvaluateTargetHealth is true, an alias resource record set inherits the health of the referenced Amazon Web Services resource, such as an ELB load balancer or another resource record set in the hosted zone.
Note the following:
CloudFront distributions
You can't set EvaluateTargetHealth to true when the alias target is a CloudFront distribution.
Elastic Beanstalk environments that have regionalized subdomains
If you specify an Elastic Beanstalk environment in DNSName and the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any.
If the environment contains a single Amazon EC2 instance, there are no special requirements.
ELB load balancers
Health checking behavior depends on the type of load balancer:
Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you set EvaluateTargetHealth to true and either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources.
Application and Network Load Balancers: If you specify an ELB Application or Network Load Balancer and you set EvaluateTargetHealth to true, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer:
For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.
A target group that has no registered targets is considered unhealthy.
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an API Gateway API. However, because API Gateway is highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
S3 buckets
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is an S3 bucket. However, because S3 buckets are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
VPC interface endpoints
There are no special requirements for setting EvaluateTargetHealth to true when the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design, EvaluateTargetHealth provides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.
Other records in the same hosted zone
If the Amazon Web Services resource that you specify in DNSName is a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide.
For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide.
HealthCheckId (string) --
If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the HealthCheckId element and specify the ID of the applicable health check.
Route 53 determines whether a resource record set is healthy based on one of the following:
By periodically sending a request to the endpoint that is specified in the health check
By aggregating the status of a specified group of health checks (calculated health checks)
By determining the current state of a CloudWatch alarm (CloudWatch metric health checks)
For more information, see the following topics in the Amazon Route 53 Developer Guide:
When to Specify HealthCheckId
Specifying a value for HealthCheckId is useful only when Route 53 is choosing between two or more resource record sets to respond to a DNS query, and you want Route 53 to base the choice in part on the status of a health check. Configuring health checks makes sense only in the following configurations:
Non-alias resource record sets: You're checking the health of a group of non-alias resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A) and you specify health check IDs for all the resource record sets. If the health check status for a resource record set is healthy, Route 53 includes the record among the records that it responds to DNS queries with. If the health check status for a resource record set is unhealthy, Route 53 stops responding to DNS queries using the value for that resource record set. If the health check status for all resource record sets in the group is unhealthy, Route 53 considers all resource record sets in the group healthy and responds to DNS queries accordingly.
Alias resource record sets: You specify the following settings:
You set EvaluateTargetHealth to true for an alias resource record set in a group of resource record sets that have the same routing policy, name, and type (such as multiple weighted records named www.example.com with a type of A).
You configure the alias resource record set to route traffic to a non-alias resource record set in the same hosted zone.
You specify a health check ID for the non-alias resource record set.
If the health check status is healthy, Route 53 considers the alias resource record set to be healthy and includes the alias record among the records that it responds to DNS queries with.
If the health check status is unhealthy, Route 53 stops responding to DNS queries using the alias resource record set.
Geolocation Routing
For geolocation resource record sets, if an endpoint is unhealthy, Route 53 looks for a resource record set for the larger, associated geographic region. For example, suppose you have resource record sets for a state in the United States, for the entire United States, for North America, and a resource record set that has * for CountryCode is *, which applies to all locations. If the endpoint for the state resource record set is unhealthy, Route 53 checks for healthy resource record sets in the following order until it finds a resource record set for which the endpoint is healthy:
The United States
North America
The default resource record set
Specifying the Health Check Endpoint by Domain Name
If your health checks specify the endpoint only 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 FullyQualifiedDomainName, specify the domain name of the server (such as us-east-2-www.example.com), not the name of the resource record sets ( www.example.com).
TrafficPolicyInstanceId (string) --
When you create a traffic policy instance, Amazon Route 53 automatically creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic policy instance that Route 53 created this resource record set for.
CidrRoutingConfig (dict) --
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A LocationName with an asterisk “*” can be used to create a default CIDR record. CollectionId is still required for default record.
CollectionId (string) --
The CIDR collection ID.
LocationName (string) --
The CIDR collection location name.
GeoProximityLocation (dict) --
GeoproximityLocation resource record sets only: A complex type that lets you control how Route 53 responds to DNS queries based on the geographic origin of the query and your resources.
AWSRegion (string) --
The Amazon Web Services Region the resource you are directing DNS traffic to, is in.
LocalZoneGroup (string) --
Specifies an Amazon Web Services Local Zone Group.
A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is us-east-1-bue-1.
You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command:
This command returns: "GroupName": "us-west-2-den-1", specifying that the Local Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1.
Coordinates (dict) --
Contains the longitude and latitude for a geographic region.
Latitude (string) --
Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
Longitude (string) --
Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
Bias (integer) --
The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
To use Bias to change the size of the geographic region, specify the applicable value for the bias:
To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
AZAffinity (dict) --
AZ-affinity resource record sets only: The location that this resource record set answers DNS queries from, such as an Availability Zone (AZ) or an Amazon Web Services Region. For each query, Route 53 starts with the most specific location that the query matches and falls back to a less specific location when there's no record for that location or the record is unhealthy (its health check fails or, for an alias record that has EvaluateTargetHealth set to true, its target is unhealthy). You must also specify SetIdentifier, and you can't specify another routing policy element, such as Weight, in the same resource record set.
For more information, see AZ-affinity routing in the Amazon Route 53 Developer Guide.
LocationType (string) --
The level of the location that LocationId identifies. Valid values, from most to least specific:
AvailabilityZone: A single Availability Zone.
AvailabilityZoneGroup: A Zone Group, which is a group of Availability Zones in an Amazon Web Services Region.
Region: An entire Amazon Web Services Region.
Partition: An entire Amazon Web Services partition.
Global: All locations.
We recommend that you create a record for the Global location type so that every query gets an answer. Route 53 responds with it when a query matches no more specific record, or when it's the only healthy record that matches. Without a Global record, Route 53 returns a "no answer" response to queries that don't match any other record.
LocationId (string) --
The ID of the location. You can specify only generally available Availability Zones and Zone Groups. Zone Group, Region, and partition IDs must belong to a partition that you can use. Specify the ID in lowercase, in the format that corresponds to LocationType:
For AvailabilityZone, the Availability Zone ID (not the Availability Zone name or a Local Zone ID), such as use1-az1.
For AvailabilityZoneGroup, the Zone Group that an Availability Zone belongs to (not a Local Zone group), such as us-east-1-zg-1.
For Region, the Region code, such as us-east-1.
For Partition, the partition name, such as aws.
For Global, the value global.
IsTruncated (boolean) --
A flag that indicates whether more resource record sets remain to be listed. If your results were truncated, you can make a follow-up pagination request by using the NextRecordName element.
NextRecordName (string) --
If the results were truncated, the name of the next record in the list.
This element is present only if IsTruncated is true.
NextRecordType (string) --
If the results were truncated, the type of the next record in the list.
This element is present only if IsTruncated is true.
NextRecordIdentifier (string) --
Resource record sets that have a routing policy other than simple: If results were truncated for a given DNS name and type, the value of SetIdentifier for the next resource record set that has the current DNS name and type.
For information about routing policies, see Choosing a Routing Policy in the Amazon Route 53 Developer Guide.
MaxItems (string) --
The maximum number of records you requested.
{'HostedZone': {'Config': {'HostedZoneTier': 'STANDARD | ADVANCED'},
'Features': {'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK '
'| '
'NS_OCCLUSION_CHECK '
'| '
'ALIAS_TARGET_CHECK '
'| '
'ACTIVE_RECORD_CHECK '
'| '
'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | '
'DISABLED'}],
'ChangeHistory': {'RetentionStartsAt': 'timestamp',
'Status': 'ENABLED | DISABLED'},
'PublicDNSFallbackStatus': 'ENABLED | DISABLED | '
'ENABLING | '
'DISABLING'}}}
Updates the comment for a specified hosted zone.
See also: AWS API Documentation
Request Syntax
client.update_hosted_zone_comment(
Id='string',
Comment='string'
)
string
[REQUIRED]
The ID for the hosted zone that you want to update the comment for.
string
The new comment for the hosted zone. If you don't specify a value for Comment, Amazon Route 53 deletes the existing value of the Comment element, if any.
dict
Response Syntax
{
'HostedZone': {
'Id': 'string',
'Name': 'string',
'CallerReference': 'string',
'Config': {
'Comment': 'string',
'PrivateZone': True|False,
'HostedZoneTier': 'STANDARD'|'ADVANCED'
},
'ResourceRecordSetCount': 123,
'LinkedService': {
'ServicePrincipal': 'string',
'Description': 'string'
},
'Features': {
'AcceleratedRecoveryStatus': 'ENABLING'|'ENABLE_FAILED'|'ENABLING_HOSTED_ZONE_LOCKED'|'ENABLED'|'DISABLING'|'DISABLE_FAILED'|'DISABLED'|'DISABLING_HOSTED_ZONE_LOCKED',
'PublicDNSFallbackStatus': 'ENABLED'|'DISABLED'|'ENABLING'|'DISABLING',
'ChangeHistory': {
'Status': 'ENABLED'|'DISABLED',
'RetentionStartsAt': datetime(2015, 1, 1)
},
'FailureReasons': {
'AcceleratedRecovery': 'string'
},
'ChangeGuardrails': [
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
]
}
}
}
Response Structure
(dict) --
A complex type that contains the response to the UpdateHostedZoneComment request.
HostedZone (dict) --
A complex type that contains the response to the UpdateHostedZoneComment request.
Id (string) --
The ID that Amazon Route 53 assigned to the hosted zone when you created it.
Name (string) --
The name of the domain. For public hosted zones, this is the name that you have registered with your DNS registrar.
For information about how to specify characters other than a-z, 0-9, and - (hyphen) and how to specify internationalized domain names, see CreateHostedZone.
CallerReference (string) --
The value that you specified for CallerReference when you created the hosted zone.
Config (dict) --
A complex type that includes the Comment and PrivateZone elements. If you omitted the HostedZoneConfig and Comment elements from the request, the Config and Comment elements don't appear in the response.
Comment (string) --
Any comments that you want to include about the hosted zone.
PrivateZone (boolean) --
A value that indicates whether this is a private hosted zone.
HostedZoneTier (string) --
The tier of the hosted zone. The tier controls which features you get and which optional features you can turn on. Valid values are the following:
STANDARD
STANDARD is the default tier for new hosted zones.
ADVANCED
ADVANCED is a tier that includes Change History and offers more optional features.
If you don't specify a tier when you create a hosted zone, Route 53 uses STANDARD. Route 53 always returns this value. For pricing information, see Amazon Route 53 pricing on the AWS website.
ResourceRecordSetCount (integer) --
The number of resource record sets in the hosted zone.
LinkedService (dict) --
If the hosted zone was created by another service, the service that created the hosted zone. When a hosted zone is created by another service, you can't edit or delete it using Route 53.
ServicePrincipal (string) --
If the health check or hosted zone was created by another service, the service that created the resource. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Description (string) --
If the health check or hosted zone was created by another service, an optional description that can be provided by the other service. When a resource is created by another service, you can't edit or delete it using Amazon Route 53.
Features (dict) --
The features configuration for the hosted zone, including accelerated recovery settings and status information.
AcceleratedRecoveryStatus (string) --
The current status of accelerated recovery for the hosted zone.
PublicDNSFallbackStatus (string) --
The current status of public DNS fallback for the hosted zone. Valid values:
ENABLED: Public DNS fallback is enabled.
DISABLED: Public DNS fallback is disabled.
ENABLING: A request to enable public DNS fallback is still propagating.
DISABLING: A request to disable public DNS fallback is still propagating.
ChangeHistory (dict) --
The status of Change History for the hosted zone, and the earliest time from which you can read its change history.
Status (string) --
Indicates whether Change History is turned on for the hosted zone. Valid values are the following:
ENABLED: Change History is turned on for the hosted zone.
DISABLED: Change History is turned off for the hosted zone.
Route 53 turns Change History on or off when the hosted zone moves to or from a tier that includes it.
RetentionStartsAt (datetime) --
The earliest date and time from which you can read the change history of the hosted zone. Route 53 returns this value only when Status is ENABLED.
FailureReasons (dict) --
Information about any failures that occurred when attempting to enable or configure features for the hosted zone.
AcceleratedRecovery (string) --
The reason why accelerated recovery failed to be enabled or disabled for the hosted zone, if applicable.
ChangeGuardrails (list) --
The name and status of each Change Guardrail for the hosted zone. For the guardrail names and statuses, see ChangeGuardrail.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) --
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) --
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
{'ChangeGuardrails': [{'Name': 'NS_FORMAT_CHECK | '
'NS_DELEGATION_AUTHORITY_CHECK | '
'NS_OCCLUSION_CHECK | ALIAS_TARGET_CHECK | '
'ACTIVE_RECORD_CHECK | ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED | DISABLED'}],
'DryRun': 'boolean',
'EnablePublicDNSFallback': 'boolean'}
Updates the features configuration for a hosted zone. This operation allows you to enable or disable specific features for your hosted zone, such as accelerated recovery and public DNS fallback.
Accelerated recovery enables you to update DNS records in your public hosted zone even when the us-east-1 region is unavailable.
Public DNS fallback enables Route 53 to retry a query against public DNS when a query for a domain name in a private hosted zone matches no existing name ( NXDOMAIN). Fallback does not occur when the name exists but has no record of the requested type. Public DNS fallback is supported only for private hosted zones.
See also: AWS API Documentation
Request Syntax
client.update_hosted_zone_features(
HostedZoneId='string',
EnableAcceleratedRecovery=True|False,
EnablePublicDNSFallback=True|False,
ChangeGuardrails=[
{
'Name': 'NS_FORMAT_CHECK'|'NS_DELEGATION_AUTHORITY_CHECK'|'NS_OCCLUSION_CHECK'|'ALIAS_TARGET_CHECK'|'ACTIVE_RECORD_CHECK'|'ACTIVE_DELEGATION_CHECK',
'Status': 'ENABLED'|'DISABLED'
},
],
DryRun=True|False
)
string
[REQUIRED]
The ID of the hosted zone for which you want to update features. This is the unique identifier for your hosted zone.
boolean
Specifies whether to enable accelerated recovery for the hosted zone. Set to true to enable accelerated recovery, or false to disable it.
boolean
Specifies whether to enable public DNS fallback for the hosted zone. Set to true to enable public DNS fallback, or false to disable it.
Public DNS fallback applies to the entire hosted zone and to all VPCs that are associated with it. To check whether a change has propagated, call GetHostedZone and review PublicDNSFallbackStatus in the response.
Public DNS fallback is supported only for private hosted zones.
list
Specify the Change Guardrails to turn on or off for the hosted zone. Each entry specifies the name of a guardrail and one of the following statuses:
ENABLED: Turns on the guardrail.
DISABLED: Turns off the guardrail.
Guardrails that aren't in the request keep their current status.
You can turn on an optional guardrail only if the tier of the hosted zone offers it. You can't turn off a guardrail that the tier includes, such as NS_FORMAT_CHECK. In either case, Route 53 returns an InvalidInput error.
(dict) --
A Change Guardrail and its status. A Change Guardrail checks each change to the records in a hosted zone, and rejects the change if the check fails.
When you submit a ChangeResourceRecordSets request, Route 53 checks each change against every guardrail that is turned on. If a check fails, Route 53 rejects the whole request and returns an error that identifies the guardrail. If every check passes, Route 53 applies the changes.
For example, suppose that ALIAS_TARGET_CHECK is turned on, and an alias record points to www.example.com. If you try to delete www.example.com, Route 53 rejects the request. To delete the record, first delete or change the alias record.
Name (string) -- [REQUIRED]
The name of the guardrail. Valid values are the following:
NS_FORMAT_CHECK
This guardrail rejects an NS record whose value looks like a Route 53 name server but isn't one.
NS_DELEGATION_AUTHORITY_CHECK
This guardrail rejects an NS record that delegates a subdomain to Route 53 name servers that don't host it.
This guardrail applies only to public hosted zones.
NS_OCCLUSION_CHECK
This guardrail rejects a change that leaves records under a delegated subdomain, where resolvers never use them.
ALIAS_TARGET_CHECK
This guardrail rejects deleting a record that an alias record in the same hosted zone points to.
ACTIVE_RECORD_CHECK
This guardrail rejects deleting a record that still receives DNS queries, if no other record with the same name and type remains to answer them.
ACTIVE_DELEGATION_CHECK
This guardrail rejects deleting the NS record for a subdomain while resolvers are still referred to it.
The tier of the hosted zone determines which guardrails it includes and which ones you can turn on.
Status (string) -- [REQUIRED]
The status of the guardrail. Valid values are the following:
ENABLED
ENABLED means that the guardrail is turned on.
DISABLED
DISABLED means that the guardrail is turned off.
boolean
Specifies whether to validate the request without changing any features. Route 53 returns the same errors as for a real request, but doesn't change the hosted zone. The default is false.
dict
Response Syntax
{}
Response Structure
(dict) --