An application runs on an Amazon EC2 instance that has an Elastic IP address in VPC A. The application requires access to a database in VPC B. Both VPCs are in the same AWS account. Which solution will provide the required access MOST securely?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a VPC peering connection between VPC A and VPC B..
Why this is the answer
Configuring a VPC peering connection between VPC A and VPC B is the most secure and efficient solution. VPC peering allows private IP address communication between instances in different VPCs as if they were in the same network, without traversing the public internet. This keeps traffic within the AWS network, enhancing security and reducing latency. The other options are less secure or less efficient: Allowing all traffic from the public IP of the application server to the DB instance security group exposes the database to potential threats from the internet if the application server's public IP is compromised or spoofed. Making the DB instance publicly accessible and assigning a public IP is highly insecure, as it exposes the database directly to the internet. Launching an EC2 instance in VPC B to proxy requests adds unnecessary complexity, latency, and a single point of failure, while still requiring secure communication between VPC A and the proxy instance.
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