AWS Certified Solutions Architect – Associate (SAA-C02) — Question 359

A solutions architect is developing a multiple-subnet VPC architecture. The solution will consist of six subnets in two Availability Zones. The subnets are defined as public, private and dedicated for databases. Only the Amazon EC2 instances running in the private subnets should be able to access a database.
Which solution meets these requirements?

Answer options

Correct answer: C

Explanation

Creating a database security group that references the security group of the private EC2 instances as the source for inbound traffic ensures that only those authorized instances can access the database. Security groups are stateful and deny all inbound traffic by default, meaning explicit 'deny' rules cannot be created, making option B incorrect. Furthermore, route tables and VPC peering connections are routing mechanisms rather than fine-grained access control systems, making options A and D incorrect for restricting instance-level access within the same VPC.