I have attached VPC and private subnets in Lambda function. That is causing the connection issue with the API Gateway/other AWS services. Can anyone suggest the solution for this?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
I suspect it’s one of these issues:
If the subnet is “private” it doesn’t have a NAT gateway attached, or
If the subnet is “public” with IGW attached (IGW = Internet Gateway) but doesn’t have Auto-assign public IP enabled.
It could also be a routing issue - make sure the Route Table for your subnet has a route for
0.0.0.0/0 pointing towards the IGW or NAT gateway.
Hope that helps :)