0

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?

1 Answer 1

1

Please have a look at amazon-elasticsearch-lambda-samples and s3_lambda_es.js

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.