I have a lambda function accessing Elasticsearch running on an EC2 instance in the same VPC. Unfortunately, the lambda fails to access the port even when I make it publicly accessible.
Both lambda and EC2 are assigned to the same VPC. The lambda is also assigned to a security group to which the SG assigned to EC2 explicitly gives inbound permissions. Lambda function is also assigned to a role with the following managed policies:
- AWSLambdaExecute
- AWSLambdaVPCAccessExecutionRole
- CloudWatchLogsFullAccess
Is Lambda missing some permissions?
Thanks!