
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
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?
A
Create a DB instance security group that allows all traffic from the public IP address of the application server in VPC A.
B
Configure a VPC peering connection between VPC A and VPC B.
C
Make the DB instance publicly accessible. Assign a public IP address to the DB instance.
D
Launch an EC2 instance with an Elastic IP address into VPC B. Proxy all requests through the new EC2 instance.
Explanation:
Correct Answer: B - Configure a VPC peering connection between VPC A and VPC B.
Why this is the MOST secure solution:
Private Network Communication: VPC peering establishes a direct network connection between VPCs using private IP addresses, keeping all traffic within the AWS network and not traversing the public internet.
Security Group Control: With VPC peering, you can use security groups to control access at the instance level, allowing only specific traffic between the EC2 instance in VPC A and the database in VPC B.
No Public Exposure: The database remains private and not exposed to the internet, significantly reducing the attack surface.
Cost-Effective: No data transfer charges between peered VPCs in the same region.
Why other options are less secure:
A. Create a DB instance security group that allows all traffic from the public IP address of the application server in VPC A.
C. Make the DB instance publicly accessible. Assign a public IP address to the DB instance.
D. Launch an EC2 instance with an Elastic IP address into VPC B. Proxy all requests through the new EC2 instance.
Best Practice: VPC peering is the recommended AWS solution for secure, private communication between VPCs within the same account and region. It provides the highest level of security while maintaining simplicity and performance.