[英]How can I index a XML file stored in S3 through AWS lambda nodejs function?
I have XML files stored in an S3 bucket.我将 XML 文件存储在 S3 存储桶中。 I have set up an ElasticSearch domain and want to index those files in the bucket through AWS lambda.我已经设置了一个 ElasticSearch 域,并希望通过 AWS lambda 索引存储桶中的这些文件。
I probably have to use this dependency.我可能不得不使用这个依赖。
var elasticSearch = require('elasticsearch');
I can see the curl command in Amazon Getting Started Doc我可以在 Amazon Getting Started Doc中看到 curl 命令
curl -XPUT elasticsearch_domain_endpoint/movies/_doc/1 -d '{"director": "Burton, Tim", "genre": ["Comedy","Sci-Fi"], "year": 1996, "actor": ["Jack Nicholson","Pierce Brosnan","Sarah Jessica Parker"], "title": "Mars Attacks!"}' -H 'Content-Type: application/json'
How can I do this through nodejs in a lambda function?如何通过 lambda function 中的 nodejs 执行此操作?
Please have a look at amazon-elasticsearch-lambda-samples and s3_lambda_es.js请查看amazon-elasticsearch-lambda-samples和s3_lambda_es.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.