I have deployed an application which exposes a REST API on EC2 instance.
This REST API needs to be accessible only from the lambda function.
I have created a VPC using launch VPC wizard and the VPC with a Single Public Subnet option.
I have created two subnets and a security group.
In the security group, I have configured the http port on which the REST service is running, to be accessible from the same security group. This security group is also assigned to Lambda function.
I have assigned the VPC, subnets and the security group to the lambda function.
I am following the below link -
Access EC2 Instance Service Via AWS Lambda Function
The lambda function is not able to connect to the REST API endpoint on the EC2 instance.
Any pointers?