diff --git a/README.md b/README.md index 4bbc7a9..7c8c379 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Check out [clirc](./odfesql_cli/conf/clirc) for details of all available configu - *-u/-w:* username and password. User needs to provide credentials when connecting to: - Elasticsearch with X-pack security enabled - Elasticsearch OSS with [Open distro Security Plugin](https://opendistro.github.io/for-elasticsearch-docs/docs/install/plugins/) installed - - IP-based AWS Elasticsearch domain with [Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled + - AWS Elasticsearch domain with [Fine Grained Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/fgac.html) enabled - *--aws-auth:* turn on to use AWS sigV4 authentication. It can be configured by AWS CLI `aws configure` command. ODFE SQL CLI will try to retrieve this config to connect. diff --git a/odfesql_cli/esconnection.py b/odfesql_cli/esconnection.py index e4fd53a..0680feb 100644 --- a/odfesql_cli/esconnection.py +++ b/odfesql_cli/esconnection.py @@ -65,7 +65,7 @@ def get_aes_client(self): click.secho(message="Can not retrieve your AWS credentials, check your AWS config", fg="red") aes_client = Elasticsearch( - hosts=[{"host": str(self.endpoint), "port": 443}], + hosts=[self.endpoint], http_auth=self.aws_auth, use_ssl=True, verify_certs=True, diff --git a/screenshots/usage.gif b/screenshots/usage.gif index 8d8efbd..e55c47b 100644 Binary files a/screenshots/usage.gif and b/screenshots/usage.gif differ diff --git a/tests/test_esconnection.py b/tests/test_esconnection.py index dcd129d..4ce6135 100644 --- a/tests/test_esconnection.py +++ b/tests/test_esconnection.py @@ -140,7 +140,7 @@ def test_get_aes_client(self): aes_test_executor.get_aes_client() mock_es.assert_called_with( - hosts=[{"host": str(AES_ENDPOINT), "port": 443}], + hosts=[AES_ENDPOINT], http_auth=aes_test_executor.aws_auth, use_ssl=True, verify_certs=True,