# hkb-alert-route53domains-change

Fires on: Any state-changing Route 53 Domains call.

Run the [common pre-checks](/wiki/runbooks/#common-pre-checks) first.

## Symptoms
An email from `hkb master alert`: `Route 53 Domains <call>` with the caller's ARN. Any state-changing call on the domain registration (contact details, transfer lock, name servers, auto-renew) matches.

## Pre-checks
1. Only HKB-DomainAdmin should make these calls. Check the caller ARN contains `AWSReservedSSO_HKB-DomainAdmin_`.
2. Read the domain's state: `aws route53domains get-domain-detail --profile ro-hkb-master --region us-east-1 --domain-name <domain>`. Check the transfer lock and the name servers.

## Resolution
- **Planned (a renewal setting, a contact update):** record it.
- **Not planned:** a domain transfer or a name-server change takes the site off the account. Turn the transfer lock back on and set the name servers back to the Prod hosted zone's, as HKB-DomainAdmin. Then remove the assignment that made the call.

## Post-checks
Transfer lock on, auto-renew on, name servers match the hosted zone's NS record.

## Rollback
The same calls in reverse, as HKB-DomainAdmin.

## Alert details

| Property | Value |
| --- | --- |
| Runs in | the management account, us-east-1 |
| Email | From `hkb master alert`: `Route 53 Domains <what> at <time> by <who>.` |
| Source | `security/hkb-security-master-alerts.yaml`, resource `Route53DomainsRule` |

The event pattern, as deployed:

```yaml
EventPattern:
  detail-type: [AWS API Call via CloudTrail]
  detail:
    eventSource: [route53domains.amazonaws.com]
    readOnly: [false]
```
