Development with AWS Services

A Lambda function in isolated subnets reaches a private database but cannot retrieve its password from AWS Secrets Manager using the standard Regional hostname. IAM permissions are sufficient, and internet egress is prohibited; which configuration provides private access without changing application code?

Show the answer

Correct answerA. Create a Secrets Manager interface endpoint with private DNS enabled and allow HTTPS from the function.

AWhy this is right: Private DNS preserves the hostname, while the endpoint security group permits HTTPS connections from the function.

BWhy not this: A public subnet does not give Lambda a public IP address and would not meet the private-access requirement.

CWhy not this: Secrets Manager uses interface VPC endpoints, not gateway endpoints.

DWhy not this: Without private DNS, the unchanged standard Regional hostname does not resolve to the interface endpoint's private addresses.

A Secrets Manager interface VPC endpoint provides private connectivity, and private DNS makes the standard Regional hostname resolve to endpoint addresses. Disabling private DNS generally requires using an endpoint-specific hostname instead.