An administrator creates two separate VPCs in the same AWS account: VPC-A and VPC-B. A Linux EC2 instance runs in VPC-A, and an Amazon RDS for MySQL instance is deployed in a private subnet in VPC-B. The application on the EC2 instance must connect to the database in VPC-B. What should the administrator do to allow the EC2 instance to reach the RDS instance?
Choose an answer
Tap an option to check your answer.
Correct answer: Establish VPC peering between the two VPCs..
Why this is the answer
Establishing VPC peering between VPC-A and VPC-B allows private network connectivity between resources in both VPCs. This enables the EC2 instance in VPC-A to communicate with the RDS instance in VPC-B using private IP addresses, which is secure and efficient. Putting the DB connection string into a route table is incorrect; route tables define network paths, not application connection details. Configuring both VPCs to use the same IPv4 CIDR block is incorrect and would lead to IP address conflicts, preventing peering and communication. Accessing the DB by its public IP address is generally not recommended for private subnet RDS instances due to security concerns and may not even be possible if the RDS instance is truly in a private subnet without a public IP.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed