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

A solutions architect is designing a two-tiered architecture that has separate private subnets for compute resources and the database. An AWS Lambda function that is deployed in the compute subnets needs connectivity to the database.
Which solution will provide this connectivity in the MOST secure way?

Answer options

Correct answer: B

Explanation

Associating a dedicated security group with the AWS Lambda function and referencing it directly in the database's security group ensures the most secure, least-privilege access control. Allowing entire subnet CIDR ranges is less secure because it permits any resource in those subnets to connect to the database, while temporarily allowing all IP addresses creates a severe security vulnerability. Amazon RDS Proxy operates within a VPC, making its external configuration incorrect and insecure.