I have XML files stored in an S3 bucket. I have set up an ElasticSearch domain and want to index those files in the bucket through AWS lambda.
I probably have to use this dependency.
var elasticSearch = require('elasticsearch');
I can see the curl command in Amazon Getting Started Doc
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?