Create
Make the following file addrecord.json with following contents:
{
"Comment": "CREATE a record ",
"Changes": [{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "dns.domain.tld",
"Type": "A",
"TTL": 300,
"ResourceRecords": [{ "Value": "8.8.8.8"}]
}}]
}
Invoke AWS CLI:
aws route53 change-resource-record-sets --hosted-zone-id {{ zone_id }} --change-batch file://./addrecord.json
Delete{
"Comment": "DELETE a record ",
"Changes": [{
"Action": "DELETE",
"ResourceRecordSet": {
"Name": "dns.domain.tld",
"Type": "A",
"TTL": 300,
"ResourceRecords": [{ "Value": "8.8.8.8"}]
}}]
}
Invoke AWS CLI:
aws route53 change-resource-record-sets --hosted-zone-id {{ zone_id }} --change-batch file://./delrecord.json
Note: