SOA-C02 Question 258
Single answerYour company has deployed an application across two VPCs in the same AWS Region. VPC A hosts the application's frontend, and VPC B hosts the backend. Both VPCs are connected using a VPC Peering connection. The frontend in VPC A needs to resolve the private domain name of a database hosted in VPC B. How can you configure DNS resolution to meet this requirement?
- A
Create a Route 53 Private Hosted Zone in VPC A and associate it with VPC B.
- B
Enable DNS resolution support in the VPC Peering connection and ensure that both VPCs use their default DNS resolvers.
- C
Deploy a Route 53 Resolver inbound endpoint in VPC A to forward DNS queries to VPC B's DNS resolver.
- D
Manually configure the private IP address of the database in VPC B as a host entry in the frontend's operating system in VPC A.
Show answer and explanation
Correct answer: B
Explanation
To enable DNS resolution across VPCs connected with a VPC Peering connection, you must ensure that DNS resolution support is enabled in the VPC Peering settings. This allows each VPC to use its default DNS resolver to resolve private domain names of resources in the other VPC. This approach adheres to best practices and leverages built-in AWS DNS capabilities without requiring additional configuration or resources.
- A. Incorrect.
Incorrect: A Private Hosted Zone cannot be directly shared across VPCs using VPC Peering. Private Hosted Zones require explicit association with each VPC, and VPC Peering does not automatically support cross-VPC DNS resolution of Private Hosted Zones.
- B. Correct.
Correct: Enabling DNS resolution support in the VPC Peering connection allows the frontend in VPC A to resolve private domain names in VPC B using the default DNS resolvers provided by AWS. This is the appropriate configuration for this scenario.
- C. Incorrect.
Incorrect: A Route 53 Resolver inbound endpoint is not required in this scenario because VPC Peering supports DNS resolution across VPCs when the correct settings are enabled.
- D. Incorrect.
Incorrect: Manually configuring host entries is not scalable or maintainable, especially in a dynamic environment where IPs may change or services may expand.