Connection handler for Amazon ES with dependency injection
Makes elasticsearch-js compatible with Amazon ES. It uses the aws-sdk to make signed requests to an Amazon ES endpoint. Define the Amazon ES config and the connection handler in the client configuration:
var es = ;
Alternatively you can pass in your own AWS Credentials object. This is particularly useful if running on AWS Lambda, since the appropriate credentials are already in the environment.
var myCredentials = 'AWS'; // Lambda provided credentialsvar es = ;