Skip to content

Commit 0c45c89

Browse files
authored
fix http/https can't be recognized issue when connect to AWS Elasticsearch(amazon-archives#26)
* fix http/https can't be recognized issue when connect to AWS Elasticsearch * update readme and usage gif
1 parent 62937ff commit 0c45c89

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Check out [clirc](./odfesql_cli/conf/clirc) for details of all available configu
4141
- *-u/-w:* username and password. User needs to provide credentials when connecting to:
4242
- Elasticsearch with X-pack security enabled
4343
- Elasticsearch OSS with [Open distro Security Plugin](https://opendistro.github.io/for-elasticsearch-docs/docs/install/plugins/) installed
44-
- IP-based AWS Elasticsearch domain with [Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled
44+
- AWS Elasticsearch domain with [Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled
4545

4646
- *--aws-auth:* turn on to use AWS sigV4 authentication. It can be configured by AWS CLI `aws configure` command. ODFE SQL
4747
CLI will try to retrieve this config to connect.

odfesql_cli/esconnection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_aes_client(self):
6565
click.secho(message="Can not retrieve your AWS credentials, check your AWS config", fg="red")
6666

6767
aes_client = Elasticsearch(
68-
hosts=[{"host": str(self.endpoint), "port": 443}],
68+
hosts=[self.endpoint],
6969
http_auth=self.aws_auth,
7070
use_ssl=True,
7171
verify_certs=True,

screenshots/usage.gif

2.76 MB
Loading

tests/test_esconnection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_get_aes_client(self):
140140
aes_test_executor.get_aes_client()
141141

142142
mock_es.assert_called_with(
143-
hosts=[{"host": str(AES_ENDPOINT), "port": 443}],
143+
hosts=[AES_ENDPOINT],
144144
http_auth=aes_test_executor.aws_auth,
145145
use_ssl=True,
146146
verify_certs=True,

0 commit comments

Comments
 (0)