Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Describe the issue:
I am trying to connect to OpenSearch service using AwsSdk2Transport to send the signed request but getting
[security_exception] authentication/authorization failure: org.opensearch.client.opensearch._types.OpenSearchException
org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [security_exception] authentication/authorization failure
Configuration:
I have followed AWS SigV4 support for OpenSearch clients · OpenSearch to create the domain and set the security config.
and added role created for lambda in the opensearch access policy
I have generated the access key and security key in the credential file located in .aws folder home path.
Relevant Logs or Screenshots:
Request failed: [security_exception] authentication/authorization failure: org.opensearch.client.opensearch._types.OpenSearchException
org.opensearch.client.opensearch._types.OpenSearchException: Request failed: [security_exception] authentication/authorization failure
at org.opensearch.client.transport.aws.AwsSdk2Transport.parseResponse(AwsSdk2Transport.java:444)
at org.opensearch.client.transport.aws.AwsSdk2Transport.executeSync(AwsSdk2Transport.java:365)
at org.opensearch.client.transport.aws.AwsSdk2Transport.performRequest(AwsSdk2Transport.java:171)
at org.opensearch.client.opensearch.OpenSearchClient.info(OpenSearchClient.java:790)
at org.example.Siggned.handleRequest(Siggned.java:36)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)