I am using aws cli to create and delete DNS record in Route 53. I am not sure about the payload or the command that has to be used. As per this link, I created this payload, but it's not working. The payload is
{
"Comment": "Delete single record set",
"Changes": [
{
"Action": "DELETE",
"ResourceRecordSet": {
"Name": "$DNS_NAME.",
"Type": "$RECORD_TYPE",
"TTL": $TTL,
"ResourceRecords": [
{
"Value": "${RESOURCE_VALUE}"
}
]
}
}
]
}
which I handled in a variable called payload And the AWS cli command is
aws route53 change-resource-record-sets --hosted-zone-id ${HOSTED_ZONE_ID} --change-batch payload
Any idea what I am doing wrong? Can anyone please confirm if the command and the payload is correct?