I created one VPC 10.5.0.0/16 with 2 subnets (10.5.1.0/24, 10.5.4.0/24).
I created a security security group:
Inbound rules:
Type Protocol Port range Source Description - optional
All traffic All All 0.0.0.0/0 allowing traffic from same security group
All traffic All All ::/0 allowing traffic from same security group
Outbound rules:
Type Protocol Port range Source Description - optional
All traffic All All 0.0.0.0/0 allowing traffic from same security group
All traffic All All ::/0 allowing traffic from same security group
Now I created 2 Lambda functions with proper IAM Role (which contains invoke policy). These 2 Lambda functions are in same VPC, subnets and security groups.
Case 1:
- I am able to invoke Lambda 2 from Lambda 1 successfully when the Lambda functions are not attached with VPC subnets and security groups
Case 2:
- I am not able to invoke Lambda 2 from Lambda 1 when these are in same VPC
I think I am missing something but i can't figure out it. Any suggestions?