Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js AWS Elasticsearch使用凭据通过节点进行访问_Node.js_Amazon Web Services_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Aws Elasticsearch - Fatal编程技术网 elasticsearch,aws-elasticsearch,Node.js,Amazon Web Services,elasticsearch,Aws Elasticsearch" /> elasticsearch,aws-elasticsearch,Node.js,Amazon Web Services,elasticsearch,Aws Elasticsearch" />

Node.js AWS Elasticsearch使用凭据通过节点进行访问

Node.js AWS Elasticsearch使用凭据通过节点进行访问,node.js,amazon-web-services,elasticsearch,aws-elasticsearch,Node.js,Amazon Web Services,elasticsearch,Aws Elasticsearch,由于我的ec2实例具有IAM角色访问权限,因此我一直在使用此代码从我的ec2实例访问我的AWS弹性搜索服务器 const { Client } = require('@elastic/elasticsearch') const client = new Client({ node: https://some_elasticsearch_endpoint.xxxxxx }); 现在,我们正在移动并确保它们可以通过密钥访问 如何使用@elastic/elasticsearchnpm模块生成客户端对

由于我的ec2实例具有IAM角色访问权限,因此我一直在使用此代码从我的ec2实例访问我的AWS弹性搜索服务器

const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: https://some_elasticsearch_endpoint.xxxxxx });
现在,我们正在移动并确保它们可以通过密钥访问

如何使用
@elastic/elasticsearch
npm模块生成客户端对象,以使用AWS creds访问ES服务器

谢谢