{"id":19113978,"url":"https://github.com/goldcaddy77/serverless-elasticsearch-client","last_synced_at":"2025-04-30T22:15:48.127Z","repository":{"id":46064274,"uuid":"83111467","full_name":"goldcaddy77/serverless-elasticsearch-client","owner":"goldcaddy77","description":"🚀 Elasticsearch client for AWS that plays nicely with serverless-offline and signed requests","archived":false,"fork":false,"pushed_at":"2022-12-06T20:39:28.000Z","size":356,"stargazers_count":6,"open_issues_count":10,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T22:15:44.408Z","etag":null,"topics":["aws","aws-elasticsearch","elasticsearch","elasticsearch-client","serverless","serverless-offline","signed-requests"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goldcaddy77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-25T06:25:36.000Z","updated_at":"2021-03-01T03:45:03.000Z","dependencies_parsed_at":"2023-01-23T15:01:39.525Z","dependency_job_id":null,"html_url":"https://github.com/goldcaddy77/serverless-elasticsearch-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldcaddy77%2Fserverless-elasticsearch-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldcaddy77%2Fserverless-elasticsearch-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldcaddy77%2Fserverless-elasticsearch-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldcaddy77%2Fserverless-elasticsearch-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldcaddy77","download_url":"https://codeload.github.com/goldcaddy77/serverless-elasticsearch-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789625,"owners_count":21644087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-elasticsearch","elasticsearch","elasticsearch-client","serverless","serverless-offline","signed-requests"],"created_at":"2024-11-09T04:39:46.067Z","updated_at":"2025-04-30T22:15:48.104Z","avatar_url":"https://github.com/goldcaddy77.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-elasticsearch-client\n\n[![serverless](https://img.shields.io/badge/serverless-1.0-dda415.svg)](http://www.serverless.com)\n[![npm version](https://img.shields.io/npm/v/serverless-elasticsearch-client.svg)](https://www.npmjs.org/package/serverless-elasticsearch-client)\n[![CircleCI](https://circleci.com/gh/goldcaddy77/serverless-elasticsearch-client/tree/master.svg?style=shield)](https://circleci.com/gh/goldcaddy77/serverless-elasticsearch-client/tree/master)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## AWS Elasticsearch Client\n\nWrapper around [elasticsearch-js](https://github.com/elastic/elasticsearch-js) client that plays nicely with AWS and serverless.  Features include:\n\n- Uses [http-aws-es](https://github.com/TheDeveloper/http-aws-es) to sign your requests so that they're valid in AWS\n- Plays nicely with [serverless-offline](https://github.com/dherault/serverless-offline)'s `IS_OFFLINE` environment variable\n- Uses sane default environment variables for AWS config\n\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Install\n\n```bash\nnpm install --save serverless-elasticsearch-client\n```\n\n## Usage\n\nUse this as you would use the standard [elasticsearch-js](https://github.com/elastic/elasticsearch-js) client.\n\n```javascript\nconst createEsClient = require('serverless-elasticsearch-client')\nconst client = createEsClient({ envPrefix: 'AWS_ES' })\n```\n\n## API\n\n### Shared [options]\n\nThe following options are shared between the two methods below.\n\n* `envPrefix` {string} if this is set, DDB will look for config in environment variables prefixed by `envPrefix`.\n* `region` {string} if not set, DDB will look in `${envPrefix}_REGION`.  If `envPrefix` is not set, it looks at \n  `AWS_REGION`.  If still not found, when in `serverless-offline` mode, it will fall back to `localhost`\n* `endpoint` {string} if in `serverless-offline` mode, this defaults to `http://localhost:8000`\n* `sslEnabled` {boolean} defaults to `true`, if in `serverless-offline` mode, it is set to false\n\n### getClient([options])\n\n* `options` {Object - shared options above or [AWS.DynamoDB standard options](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property)}\n\n### Method: dynamo.getClient\n\nCreates an `AWS.DynamoDB` with provided options.\n\n```javascript\nvar dynamo = require('serverless-elasticsearch-client')\n\nconst docClient = dynamo.getClient({\n  envPrefix: 'AWS_DDB',\n  maxRetries: 3\n})\n```\n\n### getDocumentClient([options])\n\n* `options` {Object - shared options above or [AWS.DynamoDB.DocumentClient standard options](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#constructor-property)}\n\n### Method: dynamo.getDocumentClient\n\nCreates an `AWS.DynamoDB.DocumentClient` with provided options.\n\n```javascript\nvar dynamo = require('serverless-elasticsearch-client')\n\nconst docClient = dynamo.getDocumentClient({\n  convertEmptyValues: true\n})\n```\n\n## Contribute\n\nPRs accepted.  Note that code uses [standard](https://github.com/feross/standard) styling.\n\n## License\n\nMIT © Dan Caddigan\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldcaddy77%2Fserverless-elasticsearch-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldcaddy77%2Fserverless-elasticsearch-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldcaddy77%2Fserverless-elasticsearch-client/lists"}