{"id":13526512,"url":"https://github.com/abutaha/aws-es-proxy","last_synced_at":"2025-05-16T00:08:07.628Z","repository":{"id":12655366,"uuid":"72467158","full_name":"abutaha/aws-es-proxy","owner":"abutaha","description":"aws-es-proxy is a small web server application sitting between your HTTP client (browser, curl, etc...) and Amazon Elasticsearch service.","archived":false,"fork":false,"pushed_at":"2024-07-16T12:19:24.000Z","size":126,"stargazers_count":594,"open_issues_count":39,"forks_count":201,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-08T11:09:49.067Z","etag":null,"topics":["amazon-elasticsearch","aws","elasticsearch","iam-role","proxy","sign"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abutaha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-31T18:41:40.000Z","updated_at":"2025-03-25T19:54:01.000Z","dependencies_parsed_at":"2024-01-13T21:38:32.120Z","dependency_job_id":"2719cd23-e694-41e8-84d3-1b446d7faad5","html_url":"https://github.com/abutaha/aws-es-proxy","commit_stats":{"total_commits":74,"total_committers":19,"mean_commits":"3.8947368421052633","dds":"0.43243243243243246","last_synced_commit":"5a40bd821e26ce7b6827327f25b22854a07b8880"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abutaha%2Faws-es-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abutaha%2Faws-es-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abutaha%2Faws-es-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abutaha%2Faws-es-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abutaha","download_url":"https://codeload.github.com/abutaha/aws-es-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442855,"owners_count":22071878,"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":["amazon-elasticsearch","aws","elasticsearch","iam-role","proxy","sign"],"created_at":"2024-08-01T06:01:30.824Z","updated_at":"2025-05-16T00:08:02.580Z","avatar_url":"https://github.com/abutaha.png","language":"Go","funding_links":[],"categories":["Go","aws"],"sub_categories":[],"readme":"# aws-es-proxy\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/abutaha/aws-es-proxy.svg)](https://hub.docker.com/r/abutaha/aws-es-proxy/)\n\n**aws-es-proxy** is a small web server application sitting between your HTTP client (browser, curl, etc...) and Amazon Elasticsearch service. It will sign your requests using latest [AWS Signature Version 4](http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) before sending the request to Amazon Elasticsearch. When response is back from Amazon Elasticsearch, this response will be sent back to your HTTP client.\n\nKibana requests are also signed automatically.\n\n## Installation\n\n### Download binary executable\n\n**aws-es-proxy** has single executable binaries for Linux, Mac and Windows.\n\nDownload the latest [aws-es-proxy release](https://github.com/abutaha/aws-es-proxy/releases/).\n\n### Docker\n\nThere is an official docker image available for aws-es-proxy. To run the image:\n\n```sh\n# v0.9 and newer (latest always point to the latest release):\n\ndocker run --rm -v ~/.aws:/root/.aws -p 9200:9200 abutaha/aws-es-proxy:v1.0 -endpoint https://dummy-host.ap-southeast-2.es.amazonaws.com -listen 0.0.0.0:9200\n\nv.08:\n\ndocker run --rm -it abutaha/aws-es-proxy ./aws-es-proxy -endpoint https://dummy-host.ap-southeast-2.es.amazonaws.com\n\n```\n\nTo expose a port number other than the default 9200, pass an environment variable of `PORT_NUM` to docker with the port number you wish to expose for your service.\n\n### Via homebrew\n\n```sh\nbrew install aws-es-proxy\n```\n\n### Build from Source\n\n#### Dependencies:\n* go1.14+\n\n```sh\n#requires go1.14\ngo build github.com/abutaha/aws-es-proxy\n```\n\n## Configuring Credentials\n\nBefore using **aws-es-proxy**, ensure that you've configured your AWS IAM user credentials. The best way to configure credentials on a development machine is to use the `~/.aws/credentials` file, which might look like:\n\n```\n[default]\naws_access_key_id = AKID1234567890\naws_secret_access_key = MY-SECRET-KEY\n```\n\nAlternatively, you can set the following environment variables:\n\n```\nexport AWS_ACCESS_KEY_ID=AKID1234567890\nexport AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY\n```\n\n**aws-es-proxy** also supports `IAM roles`. To use IAM roles, you need to modify your Amazon Elasticsearch access policy to allow access from that role. Below is an Amazon Elasticsearch `access policy` example allowing access from any EC2 instance with an IAM role called `ec2-aws-elasticsearch`.\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Principal\": {\n        \"AWS\": \"arn:aws:iam::012345678910:role/ec2-aws-elasticsearch\"\n      },\n      \"Action\": \"es:*\",\n      \"Resource\": \"arn:aws:es:eu-west-1:012345678910:domain/test-es-domain/*\"\n    }\n  ]\n}\n```\n\n\n\n## Usage example:\n\nYou can use either argument `-endpoint` OR environment variable `ENDPOINT` to specify AWS ElasticSearch endpoint.\n\n```sh\n./aws-es-proxy -endpoint https://test-es-somerandomvalue.eu-west-1.es.amazonaws.com\nListening on 127.0.0.1:9200\n```\n\n```sh\nexport ENDPOINT=https://test-es-somerandomvalue.eu-west-1.es.amazonaws.com\n\n./aws-es-proxy  -listen 10.0.0.1:9200 -verbose\nListening on 10.0.0.1:9200\n```\n\n*aws-es-proxy* listens on 127.0.0.1:9200 if no additional argument is provided. You can change the IP and Port passing the argument `-listen`\n\n```sh\n./aws-es-proxy -listen :8080 -endpoint ...\n./aws-es-proxy -listen 10.0.0.1:9200 -endpoint ...\n```\n\nBy default, *aws-es-proxy* will not display any message in the console. However, it has the ability to print requests being sent to Amazon Elasticsearch, and the duration it takes to receive the request back. This can be enabled using the option `-verbose`\n\n```sh\n./aws-es-proxy -verbose ...\nListening on 127.0.0.1:9200\n2016/10/31 19:48:23  -\u003e GET / 200 1.054s\n2016/10/31 19:48:30  -\u003e GET /_cat/indices?v 200 0.199s\n2016/10/31 19:48:37  -\u003e GET /_cat/shards?v 200 0.196s\n2016/10/31 19:48:49  -\u003e GET /_cat/allocation?v 200 0.179s\n2016/10/31 19:49:10  -\u003e PUT /my-test-index 200 0.347s\n```\n\nFor a full list of available options, use `-h`:\n\n```sh\n./aws-es-proxy -h\nUsage of ./aws-es-proxy:\n  -auth\n        Require HTTP Basic Auth\n  -debug\n        Print debug messages\n  -endpoint string\n        Amazon ElasticSearch Endpoint (e.g: https://dummy-host.eu-west-1.es.amazonaws.com)\n  -listen string\n        Local TCP port to listen on (default \"127.0.0.1:9200\")\n  -log-to-file\n        Log user requests and ElasticSearch responses to files\n  -no-sign-reqs\n        Disable AWS Signature v4\n  -password string\n        HTTP Basic Auth Password\n  -pretty\n        Prettify verbose and file output\n  -realm string\n        Authentication Required\n  -remote-terminate\n        Allow HTTP remote termination\n  -timeout int\n        Set a request timeout to ES. Specify in seconds, defaults to 15 (default 15)\n  -username string\n        HTTP Basic Auth Username\n  -verbose\n        Print user requests\n  -version\n        Print aws-es-proxy version\n```\n\n\n## Using HTTP Clients\n\nAfter you run *aws-es-proxy*, you can now open your Web browser on [http://localhost:9200](http://localhost:9200). Everything should be working as you have your own instance of ElasticSearch running on port 9200.\n\nTo access Kibana, use [http://localhost:9200/_plugin/kibana/app/kibana](http://localhost:9200/_plugin/kibana/app/kibana)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabutaha%2Faws-es-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabutaha%2Faws-es-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabutaha%2Faws-es-proxy/lists"}