opensearch-project / opensearch-cli

A full-featured command line interface (CLI) for OpenSearch.
https://opensearch.org/docs/latest/clients/cli/
Apache License 2.0
44 stars 24 forks source link

[BUG] Throwing error on executing command to get settings from Elastic Search with aws_iam as auth_type #48

Open varshakancham opened 2 years ago

varshakancham commented 2 years ago

What is the bug? Throwing the following error while executing curl get command on es cluster. rsreevarsha@rsreevarsha-a01 opensearch-cli % ./opensearch-cli curl get --path "_cluster/settings" --pretty --profile "default" get Command failed. Reason: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Go to opensearch-cli
  2. Enter following curl command ./opensearch-cli curl get --path "_cluster/settings" --pretty --profile "default"
  3. See error:- Reason: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors

What is the expected behavior? The command should have returned the settings of cluster.

What is your host/environment?

Do you have any additional context? Following is the profile created and region set to us-east-1:-