Is it possible to get http.max_content_length in AWS Elasticsearch?

I need to get the max_content_length to limit the size of the bulk request I am sending to AWS Elasticsearch.

In my local installation of Elasticsearch I am able to do this using GET _cluster/settings?include_defaults API. I can see http.max_content_length in the response body.

But when I run the same API on AWS Elasticsearch, I cannot see http.max_content_length in the response body.

Is there something else I should do to get the max_content_length in AWS Elasticsearch? Should I use another API, or is there another way I can achieve what I need?

I should add that I want to do this programatically, i.e. extract the value of max_content_length from the json response.

Version I'm using is Elasticsearch 7.17.

I just need to read the max_content_length and will not be updating it.

Thanks in advance.

Hi @a-moondance-94 Welcome to the community!

What exactly do you mean by AWS Elasticsearch, do you mean Elastic Cloud Deployment running on AWS? or something else.

https://cloud.elastic.co

So I just ran this on Elastic Cloud 7.17.10 Deployment on AWS Provider it is there

GET _cluster/settings?include_defaults 
# Results
{
...
    "http" : {
      "cors" : {
        "max-age" : "1728000",
        "allow-origin" : "",
        "allow-headers" : "X-Requested-With,Content-Type,Content-Length,Authorization,Accept,User-Agent,X-Elastic-Client-Meta",
        "allow-credentials" : "false",
        "allow-methods" : "OPTIONS,HEAD,GET,POST,PUT,DELETE",
        "enabled" : "false"
      },
...
      "host" : [ ],
      "publish_port" : "18267",
      "read_timeout" : "0ms",
      "max_content_length" : "100mb",  <!----- HERE
...

Hi Stephen, thanks for the response. I was referring to AWS Opensearch Service.
just to make clear, we're using Elasticsearch 7.17 there and not the opensearch implementation.

I'm quite new to this, is this different from AWS Opensearch service?

I don't have access to the AWS dashboard, but I have gotten a response from the same endpoint connecting to elasticsearch endpoint on AWS and it does not have the max_content_length.

Would you know if there are certain settings on cloud that I need so I can make the max_content_length visible?

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

Hi @a-moondance-94

Apologies I am still not clear
Either you are using Elasticsearch or OpenSearch they are not the same they are completely mutually exclusive , they do not run together.

There is no Elasticsearch 7.17 running on OpenSearch.

Can you simply run the

GET /

On your cluster and post the results.

Hi, sorry for the confusion. I've verified now that the version we're using on Amazon Opensearch is 7.10.2.

7.10.2 is EOL and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

Ok that is a fork of Elasticsearch so you will need to visit the OpenSearch forum that is that last version that was "close" but it is still fork with significant difference so the APIs and responses may be different so to visit their form and ask questions.

We're happy to help you here if you're using Elasticsearch!!!

1 Like

Thank you Stephen! I will be asking in the OpenSearch forum, then.

I do see that setting in Elasticsearch 7.10

Whether that is returned by the API or not, I'm not sure. I don't have a 7.10 to test right now

I can verify on my local Elasticsearch 7.10 installation that it does return that setting :slight_smile:
It does not on AWS Opensearch though-- this is the issue I was hoping to find an answer to...

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.