Skip to content
Advertisement

Unable to invoke second lambda within VPC – Python AWS Lamba Function

I have two simple lambda functions. Lambda 1 is invoking lambda 2 (both do a simple print for text).

If both lambdas are outside of a VPC then the invocation succeeds, however as soon as I set them both in to access a VPC (I need to test within a VPC as the full process will be wtihin a VPC) the invocation times out.

Do I have to give my lambda access to the internet to be able invoke a second lambda within the same VPC?

Advertisement

Answer

If your lambda functions are inside a VPC you need to configure your both lambda functions into private subnet not public subnet. That is the AWS recommended way.

Advertisement