Review Route 53 public DNS logging to CloudWatch

Collect the logs needed to investigate public DNS queries and verify delivery permissions.

Description

Public hosted zone query logs record the DNS names and response codes for queries that reach Route 53. Resolvers answer cached queries locally.

Potential impact

A query-count metric cannot identify which request failed. Query logs also contain domain names that may need restricted access.

Remediation

Create a CloudWatch Logs group in us-east-1 in the zone’s account and allow Route 53 to write through a Logs resource policy. Set QueryLoggingConfig to reference that group’s ARN. Choose retention and read permissions, then check that a fresh query reaching Route 53 appears in the group.

Examples

Supply your domain and log group ARN. For private DNS, use Route 53 Resolver query logging.

Before

yaml
Resources:
  HostedZone:
    Type: AWS::Route53::HostedZone
    Properties:
      Name: example.com

After

yaml
Resources:
  HostedZone:
    Type: AWS::Route53::HostedZone
    Properties:
      Name: example.com
      QueryLoggingConfig:
        CloudWatchLogsLogGroupArn: arn:aws:logs:us-east-1:123456789012:log-group:/aws/route53/example

References