AWS Python SDK | Route 53 – delete resource record

Question:

How to delete a DNS record in Route 53? I followed the documentation but I still can’t make it work. I don’t know if I’m missing something here.

Based on the documentation:

DELETE : Deletes a existing resource record set that has the specified
values for Name , Type , 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).

But I’m always getting this error:

Here’s my code:

Answer:

You need a nested ‘ResourceRecords’ array in the ResourceRecordSet, which has the current ‘target’ value of the record.

Leave a Reply