Lesson 3 of 3 Amazon Route 53

Resolving DNS in Hybrid Networks with Route 53 Resolver

This lesson explains how hybrid architectures resolve names in both directions, between on-premises DNS and VPCs, with Route 53 Resolver.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish inbound and outbound Resolver endpoints.
  • Describe how DNS is shared across accounts.
  • Describe how DNS Firewall and query logging protect DNS.

Resolver endpoints

Every VPC has the Route 53 Resolver at the .2 address, answering private hosted zones, VPC names and public DNS. In a hybrid network, on-premises servers and AWS resources each need to resolve names that the other side owns, and Resolver endpoints connect the two DNS systems.

An inbound endpoint places network interfaces in the VPC that on-premises DNS servers can forward queries to over VPN or Direct Connect, so on-premises applications can resolve names in private hosted zones, such as db.aws.example.com. An outbound endpoint, with forwarding rules, sends queries for chosen domains, such as corp.example.com, from the VPC to on-premises DNS servers. Rules can be shared with other accounts through AWS Resource Access Manager, so one set of endpoints serves many VPCs. The following table summarises the two directions.

EndpointDirectionUse
InboundOn premises → AWSOn-premises DNS forwards queries for private hosted zones
Outbound + forwarding rulesAWS → on premisesVPC resources resolve domains like corp.example.com

The following diagram shows queries travelling in both directions.

Route 53 Resolver endpoints in a hybrid network. On-premises DNS servers forward queries for private hosted zones, such as db.aws.example.com, to an inbound endpoint in the VPC. In the other direction, an outbound endpoint with forwarding rules sends queries from the VPC for domains such as corp.example.com to on-premises DNS servers. Both travel over VPN or Direct Connect.
The domain names are illustrative. Each endpoint places network interfaces in at least two Availability Zones for resilience.
Sort into groups

Inbound or outbound endpoint?

Exam skills 3.4.1 · 1.2.4

Decide which Resolver endpoint each requirement needs.

Log in to try this activity Interactive activities are free with an account.

Multi-account DNS

Private hosted zones can be associated with VPCs in other accounts, and Resolver rules shared through AWS RAM, so one networking account manages DNS for the organisation.

DNS security and logging

DNS can be abused, for example by malware looking up its command server or by attackers hiding stolen data in DNS queries, so Route 53 Resolver offers two controls. Resolver DNS Firewall filters the queries that resources in a VPC make, blocking or allowing domains from lists that you maintain or that AWS manages, such as known malicious domains. It can also restrict a VPC to approved domains only, which prevents exfiltration through DNS. Resolver query logging records every query made from chosen VPCs, with the name, type and response, to CloudWatch Logs, S3 or Firehose, for investigation and audits. The following table summarises the two features.

FeatureUse
Resolver DNS FirewallBlock lookups of malicious or unapproved domains; prevent DNS exfiltration
Resolver query loggingRecord queries from VPCs to CloudWatch Logs, S3 or Firehose
Worked example

DNS in both directions

On-premises servers must resolve db.aws.example.internal (a private hosted zone in AWS), and EC2 instances must resolve intranet.corp.example.com (on-premises DNS).

DirectionComponent
On premises → AWSRoute 53 Resolver inbound endpoint; on-premises DNS forwards aws.example.internal to its IPs
AWS → on premisesRoute 53 Resolver outbound endpoint with a forwarding rule for corp.example.com
Many VPCs and accountsShare the forwarding rule with AWS RAM

Without these endpoints, each side can resolve only its own names. Resolver DNS Firewall can also be added to block VPCs from resolving known malicious domains.

Check yourself

What does Route 53 Resolver DNS Firewall do?

Show answer

It filters DNS queries from VPCs against domain lists, so queries to known malicious or unapproved domains can be blocked or alerted on.

Exam Tips

Remember for the exam

  • When on-premises systems must resolve the names in private hosted zones, use a Resolver inbound endpoint.
  • When VPC resources must resolve on-premises names, use an outbound endpoint with a forwarding rule.
  • To block lookups of malicious domains from VPCs, use Resolver DNS Firewall.
  • To use one private hosted zone from VPCs in many accounts, use cross-account VPC association.
  • To record which domains instances look up, use Resolver query logging.