I have a lambda function running in a private VPC and need to access secrets in secrets manager. Here is my setup:
New VPC
enable_dns_support
: trueenable_dns_hostnames
: trueLambda Function
VPC Endpoint
vpc_id
: id from new VPCservice_name
: com.amazonaws.us-east-1.secretsmanagerendpoint_type
: Interfaceprivate_dns_enabled
: truesubnet_ids
: subnets I created in new vpcsecurity_group_ids
: a security group I created for the endpointVPC Endpoint Security Group
vpc_id
: id from new VPCcidr_blocks
set to the new vpc's cidr blockAfter setting this all up, my lambda times out because secrets manager cannot be accessed. I removed the vpc_config
from my lambda function as a sanity check and everything works fine.
Thanks for the help.
Based on the comments. The issue was caused by security group (SG) of the lambda, not the interface endpoint. Specifically, the SG did not allow for any egress traffic which effectively blocked access to the interface endpoint.