ChangeResourceRecordSets to create, update, or delete your authoritative DNS information
on all Amazon Route 53 DNS servers. Send a
POST request to the following resource:
Amazon Route 53 hosted zone ID/rrset
In the request body, include an XML document with a
The request body contains a list of change items, which is known as a change batch. Change batches are considered
transactional changes. When you use the Amazon Route 53 API to change resource record sets, Amazon Route 53 either makes all or none
of the changes in a change batch request. This ensures that Amazon Route 53 never partially implements the changes that you intended
to make to the resource record sets in a hosted zone.
For example, suppose you create a change batch request that deletes the CNAME record for www.example.com and creates an
alias resource record set for www.example.com. Amazon Route 53 deletes the first resource record set and creates the
second resource record set in a single operation. If either the
DELETE or the
action fails, then both changes (plus any other changes in the batch) fail, and the original CNAME record continues
To create resource record sets for complex routing configurations, you can also use either the traffic flow visual editor in the Amazon Route 53 console or the API actions for traffic policies and traffic policy instances. You save the configuration as a traffic policy, and you can 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. In addition, you can roll back the updates if the new configuration isn't performing as you expected it to. For more information, see Using Traffic Flow to Route DNS Trafficin the Amazon Route 53 API Reference or Actions on Traffic Policies and Traffic Policy Instances in this guide.
You can use
ChangeResourceRecordSetsRequest to perform the following operations:
CREATE: Creates a resource record set that has the specified values.
DELETE: Deletes an existing resource record set that has the specified values for
SetIdentifier(for latency, weighted, geolocation, and failover resource record sets), and
TTL(except alias resource record sets, for which the TTL is determined by the AWS resource that you're routing DNS queries to).
UPSERT: If a resource record set does not already exist, Amazon Route 53 creates it.
If a resource record set does exist, Amazon Route 53 updates it with the values in the request. Amazon Route 53 can update an existing resource record set only when all of the following values match:
SetIdentifier(for weighted, latency, geolocation, and failover resource record sets).
When you submit a
ChangeResourceRecordSets request, the initial status of your changes is
PENDING. This means the change has not yet propagated to all of the authoritative Amazon Route 53 DNS servers.
When the change has finished propagating, Amazon Route 53 returns a status of
After you send your change request, we recommend that you confirm that your change has propagated to all Amazon Route 53 DNS servers. Changes generally propagate to all Amazon Route 53 name servers in a couple of minutes. In rare circumstances, propagation can take up to 30 minutes. For more information, see GET GetChange.
Note the following limitations on a
A request cannot contain more than 100
A request cannot contain more than 1000
The sum of the number of characters (including spaces) in all
Valueelements in a request cannot exceed 32,000 characters.
If the value of the
Actionelement in a
UPSERTand the resource record set already exists, Amazon Route 53 automatically performs a
DELETErequest and a
CREATErequest. When Amazon Route 53 calculates the number of characters in the
Valueelements of a change batch request, it adds the number of characters in the
Valueelement of the resource record set being deleted and the number of characters in the
Valueelement of the resource record set being created.
You cannot delete the same resource record set more than once in a single change batch.