AWS Lambda Function not able to connect to AWS Secret Manager

Viewed 1048

My Lambda function needs to connect to RDS using credentials from AWS Secret Manager. Following things I had done:

  1. Created Lambda Function and associated with VPC (Eg. VPC 1) and created a separate Security group(Lambda-SG).
  2. RDS is also in the same VPC and is accessible from the Lambda function
  3. Created VPC Endpoint for Secret Manager Service so that Lambda function can connect to it.
  4. The Lambda function is not able to connect to AWS Secret Manager and getting timed out.

Any resolution will be helpful. If I remove the VPC then it is accessible but I need the VPC for connecting to the RDS instance. Cannot use NAT gateway as the cloud environment policy will not allow any Internet connection.

1 Answers

To troubleshot this connectivity issue, you can choose following option;

If you have enabled VPC Flow Logs, then you can trace vpc flow logs to check, which aws resource is rejecting the network traffic. For VPC flow logs information please refer this document from AWS.

Furthermore, Check VPC flow logs of AWS lambda's network interface(s). Also, If the traffic is going through proxy, then check proxy configurations as well.

Related