I used the CMRESHandler call below in AWS lambda. I had to add a new param "aws_token" with change in source code to successfully connect to AWS Elasticsearch using handler.test_essource() below. In spite of successful connection test from AWS lambda to AWS Elasticsearch, log.info() line at the end below, doesn't send log to Elasticsearch but instead shows up in Cloudwatch logs as below.
[INFO] 2019-01-07T17:25:26.365Z 3860c080-12a1-11e9-8bd1-356fbb9f2564 Logging something to Elasticsearch
Please suggest any possible fix to direct log to Elasticsearch as expected from code below.
PS: The same code (uses localhost/9200 and w/o aws* args) is running fine on my Macbook with local install of Elasticsearch where logs are getting sent to local Elasticsearch.
I used the CMRESHandler call below in AWS lambda. I had to add a new param "aws_token" with change in source code to successfully connect to AWS Elasticsearch using handler.test_essource() below. In spite of successful connection test from AWS lambda to AWS Elasticsearch, log.info() line at the end below, doesn't send log to Elasticsearch but instead shows up in Cloudwatch logs as below. [INFO] 2019-01-07T17:25:26.365Z 3860c080-12a1-11e9-8bd1-356fbb9f2564 Logging something to Elasticsearch Please suggest any possible fix to direct log to Elasticsearch as expected from code below. PS: The same code (uses localhost/9200 and w/o aws* args) is running fine on my Macbook with local install of Elasticsearch where logs are getting sent to local Elasticsearch.