
Answer-first summary for fast verification
Answer: Establish a VPC peering connection between VPC A and VPC B.
The correct answer is B: 'Establish a VPC peering connection between VPC A and VPC B.' VPC peering allows instances in one VPC to communicate with instances in another VPC as if they are within the same network. This method is both secure and reliable as it doesn't require public IP addresses or configuring proxies, and it leverages the AWS network infrastructure for direct communication. Other options either expose the database to the public internet (option C), which is less secure, or involve using proxies, which adds unnecessary complexity and potential points of failure (option D). Option A is also less secure since it involves configuring security groups to allow traffic from public IP addresses.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In a setup with an EC2 instance in VPC A requiring secure access to a database in VPC B, which method is most secure for enabling cross-VPC connectivity within the same AWS account?
A
Allow traffic from the EC2 instance's public IP in VPC A to the DB instance security group.
B
Establish a VPC peering connection between VPC A and VPC B.
C
Enable public accessibility for the DB instance by assigning it a public IP address.
D
Deploy a proxy EC2 instance with an Elastic IP in VPC B to route requests from VPC A.
No comments yet.