Which solution allows the on-premises application to resolve the EC2 instance hostname?
Set up an Amazon Route 53 inbound resolver endpoint with a forwarding rule for the onprem.private hosted zone. Associate the resolver with the VPC of the EC2 instance. Configure the on-premises DNS resolver to forward onprem.private DNS queries to the inbound resolver endpoint.
Set up an Amazon Route 53 inbound resolver endpoint. Associate the resolver with the VPC of the EC2 instance. Configure the on-premises DNS resolver to forward awscloud.private DNS queries to the inbound resolver endpoint.
Set up an Amazon Route 53 outbound resolver endpoint with a forwarding rule for the onprem.private hosted zone. Associate the resolver with the AWS Region of the EC2 instance. Configure the on-premises DNS resolver to forward onprem.private DNS queries to the outbound resolver endpoint.
Set up an Amazon Route 53 outbound resolver endpoint. Associate the resolver with the AWS Region of the EC2 instance. Configure the on-premises DNS resolver to forward awscloud.private DNS queries to the outbound resolver endpoint.
Explanations:
An inbound resolver endpoint in Route 53 is used for forwarding DNS queries from on-premises to AWS. However, forwarding rules should point toawscloud.privatefor resolving AWS private hostnames, notonprem.private.
This setup allows the on-premises DNS resolver to forwardawscloud.privateDNS queries to the inbound resolver in AWS. An inbound resolver endpoint with the correct domain association and forwarding rules forawscloud.privateenables the on-premises application to resolve the EC2 hostname successfully.
An outbound resolver endpoint is used to forward DNS queries from AWS to an on-premises network, not for requests coming from on-premises to AWS. The on-premises network would not be able to resolve the AWS hostnamehost1.awscloud.privatethrough this setup.
Similar to option C, an outbound resolver is inappropriate for this case. It is used to send queries to an on-premises DNS, while the requirement is to resolve AWS hostnames from on-premises.