Resolving Names Across Hybrid Networks with Route 53 Resolver
This lesson explains how Route 53 Resolver endpoints and rules let on-premises servers resolve private names in AWS and AWS workloads resolve corporate domains, at scale across an organisation.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish inbound and outbound Resolver endpoints.
- Explain how endpoints are centralised and forwarding rules shared across accounts.
- Identify the DNS security controls applied at the Resolver.
Resolver endpoints
Every VPC has the Route 53 Resolver (base address + 2), which answers public names, VPC names and associated private hosted zones, but cannot be reached from on premises by default.
Resolver endpoints connect DNS in the two directions. An inbound endpoint places Resolver IP addresses in a VPC. On-premises DNS servers forward queries for AWS private zones, such as aws.corp.example.com, to those addresses, so on-premises systems can resolve names in AWS. An outbound endpoint with forwarding rules works the other way: queries from VPCs for on-premises domains, such as corp.example.com, are sent to the on-premises DNS servers. Rules can be shared with RAM so every VPC uses them. The following table summarises the endpoints.
| Endpoint | Direction | Use |
|---|---|---|
| Inbound | On premises → AWS | On-premises DNS servers forward queries for AWS private zones (e.g. aws.corp.example.com) to Resolver IPs in a VPC |
| Outbound + forwarding rules | AWS → on premises | VPCs send queries for on-premises domains (e.g. corp.example.com) to on-premises DNS |
Scaling DNS across accounts
In an organisation with hundreds of VPCs, creating Resolver endpoints in every VPC would multiply cost and configuration. The usual design centralises inbound and outbound endpoints in a networking account's VPC, which is connected to on-premises networks, and shares the forwarding rules through AWS RAM. A workload account associates the shared rules with its VPCs, and queries for on-premises domains from those VPCs are then sent through the central outbound endpoint, without endpoints of their own.
Route 53 Profiles go further by bundling DNS configuration: private hosted zone associations, Resolver rules, DNS Firewall rule groups and endpoint settings. A Profile is shared with accounts and associated with their VPCs in one step, so every VPC receives the same DNS behaviour and later changes to the Profile apply everywhere. Private hosted zones can also be associated individually with VPCs in other accounts, after the zone owner authorises the association.
DNS security
Because every VPC's DNS queries pass through the Route 53 Resolver, it is also a natural place for security controls. Resolver DNS Firewall blocks or allows domains using managed threat lists and custom lists, and can detect DNS tunnelling, which stops malware from reaching its command-and-control servers by name. Resolver query logging records which resource looked up which name, which is essential evidence during an investigation. Both are covered in their own lessons later in this module, and both depend on workloads actually using the Resolver, so outbound DNS to other resolvers should be blocked.
Hybrid DNS for a whole organisation
Workloads in 200 VPCs must resolve corp.example.com, served by on-premises DNS servers, and on-premises users must resolve aws.example.com, a private hosted zone. Creating endpoints in every VPC would be expensive and hard to manage, so they live in one shared-services VPC connected to on premises:
OUT_EP=$(aws route53resolver create-resolver-endpoint --name outbound --direction OUTBOUND \
--creator-request-id out-$(date +%s) --security-group-ids $DNS_SG \
--ip-addresses SubnetId=$SUBNET_A SubnetId=$SUBNET_B --query ResolverEndpoint.Id --output text)
RULE_ID=$(aws route53resolver create-resolver-rule --name corp --rule-type FORWARD \
--domain-name corp.example.com --resolver-endpoint-id $OUT_EP \
--creator-request-id rule-$(date +%s) \
--target-ips Ip=10.20.0.10,Port=53 Ip=10.20.0.11,Port=53 --query ResolverRule.Id --output text)
aws ram create-resource-share --name corp-dns-rule \
--resource-arns arn:aws:route53resolver:eu-west-1:222222222222:resolver-rule/$RULE_ID \
--principals arn:aws:organizations::111111111111:organization/o-a1b2c3d4e5Each account associates the shared rule with its VPCs, or, more simply, a Route 53 Profile containing the rule, the private hosted zone associations and DNS Firewall rule groups is shared once and associated with every VPC. In the other direction, an inbound endpoint in the same VPC provides two IP addresses to which the on-premises DNS servers forward aws.example.com.
How are central Resolver forwarding rules applied to VPCs in many accounts?
Show answer
The rules are shared through RAM and associated with each VPC, so every VPC forwards through the central outbound endpoints.
Exam Tips
Remember for the exam
- For on-premises servers to resolve AWS private names, use a Resolver inbound endpoint.
- For AWS workloads to resolve corporate domains, use an outbound endpoint with a forwarding rule.
- To share forwarding rules with every account, use AWS RAM from a central networking account.
- To apply DNS settings to hundreds of VPCs at once, use Route 53 Profiles.
- To block malicious domains from VPCs, use Resolver DNS Firewall.