{"id":15021274,"url":"https://github.com/techjacker/elasticsearchquery","last_synced_at":"2025-10-27T21:31:50.299Z","repository":{"id":50206394,"uuid":"135924796","full_name":"techjacker/elasticsearchquery","owner":"techjacker","description":"Runs queries against AWS elasticsearch deployments","archived":false,"fork":false,"pushed_at":"2022-12-08T02:12:42.000Z","size":12,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T08:41:51.474Z","etag":null,"topics":["aws","aws-elasticsearch","elasticsearch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techjacker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-03T17:16:46.000Z","updated_at":"2019-10-20T15:50:30.000Z","dependencies_parsed_at":"2023-01-24T05:00:34.657Z","dependency_job_id":null,"html_url":"https://github.com/techjacker/elasticsearchquery","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Felasticsearchquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Felasticsearchquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Felasticsearchquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techjacker%2Felasticsearchquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techjacker","download_url":"https://codeload.github.com/techjacker/elasticsearchquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238561372,"owners_count":19492703,"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"],"created_at":"2024-09-24T19:56:23.114Z","updated_at":"2025-10-27T21:31:44.981Z","avatar_url":"https://github.com/techjacker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/techjacker/elasticsearchquery.svg?branch=master)](https://travis-ci.org/techjacker/elasticsearchquery)\n\n# AWS Elasticsearch Query\n\nThis library will run your static queries against elasticsearch deployments on AWS. Supply the endpoint plus the local filepath to your JSON file containing the query payload.\n\nGood for lambda functions setting up mappings for AWS elasticsearch deployments.\n\n-----------------------------------------------------------\n\n## Example Usage\n\n### Command Line\n\n#### 1. Set required environment variables\n```Shell\n# .env\nexport ES_ENDPOINT=https://xxx.xxx.es.amazonaws.com\nexport ES_REGION=eu-west-1\n```\n\n```Shell\n$ source .env\n```\n\n\n#### 2. Create JSON file with your Elasticsearch query to be run\n```Shell\n# my_es_query.json\n{\n\t\"query\": {\n\t  \"match\": {\n\t  }\n\t}\n}\n```\n\n#### 3. Run your query\nIt will automatically pick up your AWS credentials from your shell's environment.\n```Shell\n$ elasticsearchquery \u003ces_index\u003e \u003cquery_filepath\u003e\n$ elasticsearchquery places my_es_query.json\n```\n\n\n### Programmatic API\n\n```\nfrom elasticsearchquery import ElasticSearchQuery\n\n\nesQuery = ElasticSearchQuery(\n  es_endpoint='https://xxx.xxx.es.amazonaws.com',\n  index_name='my_index',\n  query_file='path_to_query.json',\n  region='eu-west-1',\n)\nesQuery.run()\n```\n-----------------------------------------------------------\n## Unit Tests\n\n#### 1. Set Environment\nMake a virtual environment and intall the dependencies.\n```\n$ make env\n$ source env/bin/activate\n$ make deps\n```\n\n#### 2. Run Unit Tests\n```\n$ make test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Felasticsearchquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechjacker%2Felasticsearchquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechjacker%2Felasticsearchquery/lists"}