Skip to content Skip to sidebar Skip to footer

How To Allow Invoking An Aws Lambda Function Only From Ec2 Instances Inside A Vpc

I am struggling with understanding how I can easily invoke my lambda function from an EC2 instance within a VPC. I think I have a quite common problem but strangely enough I didn't

Solution 1:

There are various ways, other than API Gateway, to invoke Lambda functions. The one most relevant to your use case would be the Invoke API. You can find the official documentation here and the Boto library's, in case you are using Boto, here.

Also, as mentioned in a comment on the question, you can assign an IAM role to the EC2 instances that allows them to Invoke the Lambda function.

Post a Comment for "How To Allow Invoking An Aws Lambda Function Only From Ec2 Instances Inside A Vpc"