How do I log a query for Amazon Route 53?
I want to know what logging options are supported in Amazon Route 53 and how I can log different DNS queries.
"I want to know what logging options are supported in Amazon Route 53 and how I can log different DNS queries.Short descriptionIf you configure Amazon Route 53 as the DNS hosting service for your domain, then you can log all of the public DNS queries.By default, Amazon Virtual Private Cloud (Amazon VPC) uses Amazon Route 53 Resolver to resolve DNS queries that originate from your VPC resources. Route 53 Resolver uses Resolver query logging to log all DNS queries.ResolutionPublic DNS query loggingYou must turn on Route 53 public query logging in each public hosted zone. Amazon Route 53 publishes the logs to Amazon CloudWatch Logs. Public query logging records the following information for all DNS queries:Log format versionQuery timestampHosted Zone IDQuery nameQuery typeDNS response codeLayer 4 protocolRoute53 edge locationResolver IP addressEDNS client subnetTurn on public DNS query loggingYou must turn on public DNS query logging in the AWS account that hosts your DNS. For more information, see Configuring logging for DNS queries.Resolver query loggingRoute 53 Resolver query logging records all DNS queries that your resolver handles. These query logs are useful in troubleshooting the following DNS queries:DNS queries generating from your VPCsDNS queries that inbound and outbound Resolver endpoints handleRoute 53 Resolver DNS firewall actionsYou can use CloudWatch Logs, an Amazon Simple Storage Service (Amazon S3) bucket, or Amazon Kinesis Data Firehose as your log destination.Resolver query logs collect the following details for all DNS queries:Query log versionAccount IDRegionVPC IDQuery timestampQuery nameQuery typeQuery classResponse codeAnswer typeRDATAAnswer classSource addressTransport layer protocolSource IDsInstance IDResolver endpointFirewall rule group IDFirewall rule actionFirewall domain list IDTurn on Resolver query loggingFor information on turning on Resolver query logging, see Managing Resolver query logging configurations.Related informationMonitoring Amazon Route 53Follow"