简体   繁体   English

如何通过 AWS lambda nodejs function 索引存储在 S3 中的 XML 文件?

[英]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 执行此操作?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 function 在从 aws 中的 s3 读取文件后将数据传递给 aws cognito 时退出 lambda 在 nodejs 中 - function exits when passing data to aws cognito after reading file from s3 in aws lambda in nodejs 如何从Lambda函数解析AWS S3文件 - How to parse an AWS S3 file from a Lambda function 如何将 AWS S3 用于 npm 注册表(nodeJs AWS Lambda) - How to use AWS S3 for npm registry (nodeJs AWS Lambda) 使用 nodejs 获取多个文件并写入 AWS S3 Lambda function - Fetch multiple files and write to AWS S3 with nodejs Lambda function 如何在 NodeJS 中为 AWS S3 对象的不同文件版本生成预签名的 url? - How I can generated pre-signed url for different file versions of AWS S3 objects in NodeJS? 如何使用putObject从Node.js将CSV文件上传到AWS S3? - How can I use putObject to upload a csv file to AWS S3 from Nodejs? 如何使用Node.js将单个文件上传到AWS s3上的多个路径? - How can I upload single file to multiple path on aws s3 using nodejs? 如何使用NodeJS改善AWS Lambda函数的性能? - How can I improve the performance of an AWS Lambda Function with NodeJS? 使用 Nodejs 读取存储在 aws S3 中的 JSON 文件 - Read JSON file stored in aws S3 with Nodejs 如何使用带有Lambda函数的Node.js在AWS S3存储桶中创建嵌套文件夹? - How to create nested folders in aws s3 bucket using nodejs with lambda function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM