Which solution will meet these requirements?
Create an Amazon Route 53 Resolver inbound endpoint. Create a conditional forwarding rule on the on-premises DNS servers to forward DNS requests for example.com to the inbound endpoints.
Create an Amazon Route 53 Resolver inbound endpoint. Create a forwarding rule on the resolver that sends all queries for example.com to the on-premises DNS servers. Associate this rule with the VPC.
Create an Amazon Route 53 Resolver outbound endpoint. Create a conditional forwarding rule on the on-premises DNS servers to forward DNS requests for example.com to the outbound endpoints.
Create an Amazon Route 53 Resolver outbound endpoint. Create a forwarding rule on the resolver that sends all queries for example.com to the on-premises DNS servers. Associate this rule with the VPC.
Explanations:
An inbound endpoint in Route 53 Resolver is used for accepting DNS queries from on-premises to AWS. However, the solution requires sending DNS queries from EC2 instances to on-premises DNS servers, which necessitates an outbound endpoint.
An inbound endpoint is designed for accepting queries from on-premises to AWS, not the other way around. The requirement is for EC2 instances to send DNS queries to on-premises servers, which needs an outbound endpoint.
Outbound endpoints are used to send queries from AWS to external DNS servers, but the solution calls for configuring conditional forwarding on the on-premises DNS servers, which does not meet the requirement of forwarding queries to the VPC.
An outbound endpoint in Route 53 Resolver sends DNS queries from EC2 instances in the VPC to the on-premises DNS servers. The forwarding rule on the resolver is used to forward specific DNS queries (for example.com) to the on-premises DNS servers. This solution meets the requirement.