AWS Certified Security – Specialty — Question 199

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 than 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 allows only the EC2 instances that need database access to connect by linking the application security group to the database security group. Option A and D are incorrect as they allow broader access through network ACLs, which is not necessary. Option B is also wrong because it permits access from the application VPC to the database VPC indiscriminately, rather than restricting access to specific instances.