# Is it possible to get http.max\_content\_length in AWS Elasticsearch?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223>\
**Category:** Elasticsearch\
**Created:** [June 29, 2023, 2:59pm UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223 "2023-06-29T14:59:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![a-moondance-94](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@a-moondance-94](https://discuss.elastic.co/u/a-moondance-94)\
**Post date:** [June 29, 2023, 2:59pm UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/1 "2023-06-29T14:59:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 29, 2023, 7:03pm UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/2 "2023-06-29T19:03:30Z")

</div>

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`

> [@a-moondance-94](#):
>
> `GET _cluster/settings?include_defaults`

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

```auto
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
...

```

---

<div class="post-metadata">

**Author:** ![a-moondance-94](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@a-moondance-94](https://discuss.elastic.co/u/a-moondance-94)\
**Post date:** [June 30, 2023, 1:05am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/3 "2023-06-30T01:05:38Z")

</div>

> [@stephenb](#):
>
> [https://cloud.elastic.co](https://cloud.elastic.co)

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.

> [@stephenb](#):
>
> do you mean Elastic Cloud Deployment running on AWS

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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 30, 2023, 1:05am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/4 "2023-06-30T01:05:38Z")

</div>

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: )

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 30, 2023, 2:45am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/5 "2023-06-30T02:45:14Z")

</div>

> [@a-moondance-94](#):
>
> I was referring to AWS Opensearch Service.  
> just to make clear, we're using Elasticsearch 7.17 there and not the opensearch implementation

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.

---

<div class="post-metadata">

**Author:** ![a-moondance-94](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@a-moondance-94](https://discuss.elastic.co/u/a-moondance-94)\
**Post date:** [June 30, 2023, 2:49am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/6 "2023-06-30T02:49:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 30, 2023, 2:49am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/7 "2023-06-30T02:49:39Z")

</div>

7.10.2 is [EOL](https://www.elastic.co/support/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: )

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 30, 2023, 2:53am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/8 "2023-06-30T02:53:03Z")

</div>

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!!!

---

<div class="post-metadata">

**Author:** ![a-moondance-94](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@a-moondance-94](https://discuss.elastic.co/u/a-moondance-94)\
**Post date:** [June 30, 2023, 3:26am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/9 "2023-06-30T03:26:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [June 30, 2023, 3:34am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/10 "2023-06-30T03:34:58Z")

</div>

I do see that setting in Elasticsearch 7.10

> **[HTTP | Elasticsearch Guide \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/modules-http.html)**

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

---

<div class="post-metadata">

**Author:** ![a-moondance-94](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@a-moondance-94](https://discuss.elastic.co/u/a-moondance-94)\
**Post date:** [June 30, 2023, 3:40am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/11 "2023-06-30T03:40:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 28, 2023, 3:40am UTC](https://discuss.elastic.co/t/is-it-possible-to-get-http-max-content-length-in-aws-elasticsearch/337223/12 "2023-07-28T03:40:55Z")

</div>

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