Code Monkey home page Code Monkey logo

Comments (6)

pquentin avatar pquentin commented on June 6, 2024 2

Even if you're using the elasticsearch-py client in this snippet, you're still likely using the AWS OpenSearch server because I don't think Elasticsearch supports AWS Signature Version 4 which was designed for AWS services.

The Elasticsearch clients go through rigorous testing and validation against the official Elasticsearch distribution coming from Elastic. Since the AWS Elasticsearch Service has incompatible APIs with Elasticsearch itself, either by missing APIs or has incompatible format, we do not support it. Please consider using Elastic Cloud for an official and formally supported hosted Elasticsearch distribution.

from elasticsearch-py.

pquentin avatar pquentin commented on June 6, 2024 1

For clarity: we aren't able to offer support on the OpenSearch client. This isn't our software, you will need to redirect your question to that project's support channels instead.

And again, any such support request for any software will generally require more information than you have provided here. A standalone error message does not give enough context, so when you do contact OpenSearch, you will probably need to at least supply the code you are running and details of your client-server infrastructure.

from elasticsearch-py.

pquentin avatar pquentin commented on June 6, 2024

Hello! You appear to be using https://github.com/opensearch-project/opensearch-py - this repository is about the Elasticsearch Python client. In any case, you will need to provide more information than this to get help. Thanks.

from elasticsearch-py.

rashmiranjanbhoi avatar rashmiranjanbhoi commented on June 6, 2024

@pquentin Thank you for your response, but could you please explain the reason behind this error that I am seeing?

from elasticsearch-py.

rashmiranjanbhoi avatar rashmiranjanbhoi commented on June 6, 2024

@pquentin I am using the below ES code and getting the below error

from requests_aws4auth import AWS4Auth
from elasticsearch import Elasticsearch, RequestsHttpConnection

AWS_ACCESS_KEY_ID = "XXXXXXXXXXXXXXXXX"
AWS_SECRET_ACCESS_KEY = "XXXXXXXXXXXXXXXX"
AWS_REGION = "us-east-1"
awsauth = AWS4Auth(AWS_ACCESS_KEY_ID,
                   AWS_SECRET_ACCESS_KEY,
                   AWS_REGION, 'es')


es = Elasticsearch(
        ['https://url'],
        http_auth=awsauth,
        use_ssl=True,
        verify_certs=True,
        connection_class=RequestsHttpConnection
    )

print(es.info())

elasticsearch.exceptions.AuthorizationException: AuthorizationException(403, 'security_exception', 'no permissions for [cluster:monitor/main] and User [name=arn:aws:iam::123456789:user/elastic-search/username, backend_roles=[], requestedTenant=null]')

FYI: the credential i am using have admin access.

from elasticsearch-py.

rashmiranjanbhoi avatar rashmiranjanbhoi commented on June 6, 2024

@pquentin Thank you

from elasticsearch-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.