Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@zhongnansu/http-aws-es
Advanced tools
Use the elasticsearch-js client with Amazon ES
Weekly downloads
Readme
Newer version available at aws-elasticsearch-js for more recent versions of Elasticsearch and elasticsearch-js.
Makes elasticsearch-js compatible with Amazon ES. It uses the aws-sdk to make signed requests to an Amazon ES endpoint.
# Install the connector, elasticsearch client and aws-sdk
npm install --save http-aws-es aws-sdk elasticsearch
// create an elasticsearch client for your Amazon ES
let es = require('elasticsearch').Client({
hosts: [ 'https://amazon-es-host.us-east-1.es.amazonaws.com' ],
connectionClass: require('http-aws-es')
});
The connector uses aws-sdk's default behaviour to obtain region + credentials from your environment. If you would like to set these manually, you can set them on aws-sdk:
let AWS = require('aws-sdk');
AWS.config.update({
credentials: new AWS.Credentials(accessKeyId, secretAccessKey),
region: 'us-east-1'
});
let options = {
hosts: [], // array of amazon es hosts (required)
connectionClass: require('http-aws-es'), // use this connector (required)
awsConfig: new AWS.Config({ region }), // set an aws config e.g. for multiple clients to different regions
httpOptions: {} // set httpOptions on aws-sdk's request. default to aws-sdk's config.httpOptions
};
let es = require('elasticsearch').Client(options);
npm test
# test against a real endpoint
AWS_PROFILE=your-profile npm run integration-test -- --endpoint https://amazon-es-host.us-east-1.es.amazonaws.com --region us-east-1
FAQs
Use the elasticsearch-js client with Amazon ES
The npm package @zhongnansu/http-aws-es receives a total of 13,462 weekly downloads. As such, @zhongnansu/http-aws-es popularity was classified as popular.
We found that @zhongnansu/http-aws-es demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.