How to connect to Amazon OpenSearch Service?

Hi, I want to know how to connect to Amazon OpenSearch Service.
I have already followed the step in this document(Elasticsearch Integration).
But I got the "Unable to connect. Error: No Living connections" or "Unable to connect. Error: Authorization Exception" error message.

I also tried to use the REST API resource for connecting to the OpenSearch service with AWS v4 Authorization.
But it provides the authentication information in the Query string.
Therefore, I got authentication failed.
Is there a way to change the authentication information to the headers?

1 Like

Hi @TonyJin, I would like to get more information on what you're seeing. Could you share more about how you're setting up your resource for Amazon OpenSearch? Could you walk us through on how you're getting this error? Screenshots or screen recording on this can be very helpful for us to understand how to help :slightly_smiling_face:

Hi @Kenny
First I followed this document(Elasticsearch Integration) to connect to Amazon OpenSearch Service.
But I got two errors.

  1. No Living connections
  2. Unable to connect. Error: Authorization Exception

Then I tried to use the API to connect to Amazon OpenSearch Service.
Here is what I set in the API.


But I got an error as below.

It seems the API resource put the authorization in the URL. But the Amazon OpenSearch Service needs authorization in the header.

Do you have any advice for this?

Hey @TonyJin! I saw that you wrote in to us through intercom as well, just want to acknowledge here that the AWS v4 header authentication issue is something that we're looking into on our end and we'll report back here as well when there's a fix!

1 Like

Hey @TonyJin! Just want to give an update here that we've rolled at AWSv4 header auth to all cloud customers! :slightly_smiling_face:

Signing request for OpenSearch service using Java SDK is easy.
https://www.w3spot.com/2022/11/how-to-instantiate-opensearch-client-in-java.html

For OpenSearch serverless version, we need to change a bit How to Instantiate OpenSearch Serverless Java Client – W3 Spot

Hi @Kabirdas,

Great you added the Baic Auth option. However, I tried it get the following problem: https://community.retool.com/t/problem-with-connecting-to-opensearch-with-basic-auth/28561?u=rroukens. Can you figure out what's going on? There are not many options here, just filing host and username/password should do it (it works from Postman). Any ideas?

Thanks,
Rogier