首页 > 解决方案 > Connect to AWS Lighsail instance on port 9200 from AWS Lambda

问题描述

I'm trying to setup elasticsearch on my AWS lightsail instance, and got it running on port 9200, however I'm not able to connect from AWS lambda to the instance on the same port. I've updated my lightsail instance level networking setting to allow port 9200 to accept traffic, however I'm neither able to connect to port 9200 through the static IP, nor I'm able to get my AWS lambda function to talk to my lightsail host on port 9200.

I understand that AWS has separate Elasticsearch offering that I can use, however I'm doing a test setup and need to run vanilla ES on the same lightsail host. The ES is up and running and I can connect to it through SSH tunnel, however it doesn't work when I try to connect using the static IP or through another AWS service.

Any pointers shall be appreciated.

Thanks.

标签: amazon-web-serviceselasticsearchaws-lambdaamazon-lightsail

解决方案


我可能迟到了,但是对于仍在为此类问题苦苦挣扎的任何人都应该知道,默认情况下,新版本的弹性搜索绑定到本地主机,如本答案中所述 以覆盖此行为,您应该设置:

network.bind_host: 0 

允许在本地主机之外访问节点


推荐阅读