opensearch-project / reporting-cli

Apache License 2.0
4 stars 13 forks source link

[BUG]AWS Lambda CLI execution results in an authentication error about Cognito authentication. #57

Closed tasaishogo closed 7 months ago

tasaishogo commented 9 months ago

What is the bug?

I tried both CLI and Lambda execution with the same execution options, but the latter results in an authentication error.

How can one reproduce the bug?

Create OpenSearch using Cognito's Hosted UI as a means of authentication. Create a Lambda for that OpenSearch using the following steps and then https://opensearch.org/docs/2.5/dashboards/reporting-cli/rep-cli-lambda/

Execute the Lambda with the following input

{
  "url": "https://{cluster_domain}/_dashboards/app/dashboards#/view/{dashboard_id}",
  "transport": "ses",
  "from": "{mail address}",
  "to": "{mail address}",
  "subject": "Test lambda docker image",
  "auth": "cognito",
  "credentials": "{cognito username}:{cognito password}",
  "tenant": "global_tenant",
  "format": "png"
}

What is the expected behavior?

The Lambda should be authenticated.

What is your host/environment?

I use the Docker image created according to Step 1 of the official document. architecture is x86_64 as specified in the same document.

OpenSearch is ver2.11

Do you have any screenshots? The following is the result of success with CLI.

I tried opensearch-reporting-cli execution and it was succeded last week. Reporting result

The cli execution may also be unstable. There are problems with the tenants today. But the authentication has still been cleared.

CLI execution

The following is the result of Lambda execution which resulted in the authentication error despite specifying the same options as in the CLI. Lambda Error

rupal-bq commented 7 months ago

Similar issue as https://github.com/opensearch-project/reporting-cli/issues/55. Fix is merged in https://github.com/opensearch-project/reporting-cli/pull/65.

rupal-bq commented 7 months ago

Closing this as it's resolved in v1.1.0. Please create issue if you are still getting any errors.