AWS Certified Security – Specialty (SCS-C03) — Question 51

A company is implementing a new application in a new AWS account. A VPC and subnets have been created for the application. The application has been peered to an existing VPC in another account in the same AWS Region for database access Amazon EC2 instances will regularly be created and terminated in the application VPC, but only some of them will need access to the databases in the peered VPC over TCP port 1521. A security engineer must ensure that only the EC2 instances that need access to the databases can access them through the network.
How can the security engineer implement this solution?

Answer options

Correct answer: C

Explanation

The correct answer is C because it establishes a security group in the application VPC with no inbound rules, which enhances security by restricting access. It then allows access to the database VPC through a specific inbound rule that permits traffic only from the designated application security group over TCP port 1521. Options A and D are incorrect as they allow broader access than necessary, potentially exposing the database to unwanted traffic. Option B is also incorrect because it creates a security group in the application VPC that allows traffic from the database VPC, which is not required.