Development with AWS Services

A VPC-connected Lambda function times out connecting to an RDS PostgreSQL database in the same VPC. Routes and network ACLs permit traffic, and the function allows outbound traffic, but the database security group has no inbound rules; what should the developer change?

Show the answer

Correct answerD. Allow inbound TCP port 5432 from the function's security group on the database security group.

AWhy not this: An endpoint environment variable identifies the destination but does not change network filtering.

BWhy not this: Permission to describe a database instance does not authorize network connections to its database port.

CWhy not this: The function initiates the connection, so an inbound rule on its security group does not open the database.

DWhy this is right: The database must allow incoming PostgreSQL connections from the security group associated with the function.

The database security group must permit PostgreSQL connections from the function's security group. An inbound rule on the function does not authorize connections entering the database.