AWS Certified Solutions Architect – Professional
Route 53 Resolver inbound vs outbound endpoints for SAP-C03
AWS documents two Route 53 VPC Resolver endpoint types. An inbound endpoint lets DNS resolvers on your network send queries into a VPC, where private hosted zones are answered. An outbound endpoint, with forwarding rules, sends queries from VPCs to your network's resolvers. A rule works only in VPCs it is associated with and can be shared with other accounts.
Inbound and outbound endpoints
Every VPC has a resolver at the VPC base address plus two. It answers queries for VPC domain names and for records in private hosted zones, and it resolves public names recursively. Route 53 VPC Resolver is the current name for what was called Route 53 Resolver.
Name the direction by where the query starts. If on-premises clients must resolve names in a private hosted zone, create an inbound endpoint and have the on-premises DNS servers forward that domain to the endpoint's IP addresses. The query arrives over Direct Connect or Site-to-Site VPN, and the resolver answers it.
If instances in VPCs must resolve names that on-premises DNS servers host, create an outbound endpoint and a forwarding rule. The rule names one domain and the target IP addresses of the on-premises resolvers. The outbound endpoint's addresses come from the VPC's range and are not public, so the VPC needs a private path to the network. A full hybrid setup uses one endpoint of each type.
Forwarding rules across accounts and Regions
A forwarding rule does nothing until it is associated with a VPC. After the association, queries from that VPC for the rule's domain go through the outbound endpoint named in the rule. One outbound endpoint can serve many VPCs in the same Region. Rules are created in a Region as well, so VPCs in a second Region need an endpoint and rules in that Region.
For many accounts, keep the endpoints and rules in one network account and share the rules through AWS Resource Access Manager (AWS RAM) with accounts, an OU or the organization. Each receiving account associates the shared rule with its own VPCs in the same way as a rule it created. It cannot change or delete the rule, so there is one copy to maintain.
The rule quota per Region counts against the account that created the rule. The quota on rule-to-VPC associations counts against the account that makes the association. If the owner deletes or unshares a rule, the associated VPCs fall back to their remaining rules. If an account moves to an OU that the rule is not shared with, its associations with the rule are deleted.
Private hosted zones across accounts
A VPC in one account can be associated with a private hosted zone in another account without any Resolver endpoint or rule. The account that owns the zone first authorizes the association, with one authorization per VPC. The account that owns the VPC then makes the association. Both steps need the AWS CLI, an SDK or the API. The Route 53 console cannot do either. AWS recommends deleting the authorization afterwards, which leaves the association in place.
When public and private zones overlap, the resolver uses the most specific private zone whose name equals the query name or is a parent of it. If no private zone matches, the query goes to public DNS. If a private zone matches and the name is not in it, the resolver returns NXDOMAIN and does not retry against public DNS, unless public DNS fallback is enabled for the zone. A private zone named for the apex therefore captures every name under it in that VPC.
If a forwarding rule and a private hosted zone cover the same domain in the same VPC, the rule takes precedence and the query is forwarded to your network.
Where the exam catches people
- Believing an outbound endpoint lets on-premises servers query a private hosted zone: queries that start on premises need an inbound endpoint.
- Believing a rule shared through AWS RAM takes effect when it is shared: each account must still associate it with its VPCs.
- Believing an outbound endpoint in one Region can serve VPCs in another Region: an endpoint serves VPCs in the same Region.
- Believing one authorization covers every VPC in the other account: the zone owner submits one authorization per VPC, and the console cannot do it.
- Believing a private hosted zone wins over a forwarding rule for the same domain: the rule takes precedence.