title: Failed to search on AWS Elasticsearch using python elasticsearch returns 411
body: <p>I tried to search the data over AWS elasticsearch with python client elasticsearch</p>
  
  <p>I can able to create index, load data. But search is not working. </p>
  
  <p>Please help me out from this problem.</p>
  
  <p>Here is sample code: </p>
  
  <pre><code>es.search(index="test_index", size=2, body={"query": {"match_all": {}}})
  </code></pre>
  
  <p>Error:</p>
  
  <p>Undecodable raw error response from server: Expecting value: line 2 column 1 (char 1)
  TransportError(411, '\n\n\n\nERROR: The requested URL could not be retrieved\n\n\n\n<h1>ERROR</h1>\n<h2>The requested URL could not be retrieved</h2>\n\n<hr>\n\n\n<p><b>Invalid Request</b> error was encountered while trying to process the request:</p>\n\n\n<pre>GET /test_index/_search?size=2 HTTP/1.1\nAccept-Encoding: identity\r\nContent-Type: application/json\r\nContent-Length: 28\r\nx-amz-date: 20180723T114857Z\r\nx-amz-content-sha256: 328683bef5f07407759e09894e2785f4017bcd8914592ce04d87cc45b4d3be35\r\nAuthorization: ** NOT DISPLAYED **\r\nHost: search-testelasticseach-pkpbravqd4djbi3kjtihsra5ma.us-east-2.es.amazonaws.com\r\n</pre>\n\n\n<p>Some possible problems are:</p>\n<ul>\n<p>Missing or unknown request method.</p></li>\n<p>Missing URL.</p></li>\n<p>Missing HTTP Identifier (HTTP/1.0).</p></li>\n<li><p>Request is too large.</p></li>\n<li><p>Content-Length missing for POST or PUT requests.</p></li>\n<li><p>Illegal character in hostname; underscores are not allowed.</p></li>\n<li><p>HTTP/1.1 Expect: feature is being asked from an HTTP/1.0 software.</p></li>\n</ul>\n\n<p>Your cache administrator is admin@localhost.</p>\n<br>\n\n\n\nif (\'GET\' != \'[unknown method]\') document.getElementById(\'missing-method\').style.display = \'none\';\nif (\'<a href="http://search-testelasticseach-pkpbravqd4djbi3kjtihsra5ma.us-east-2.es.amazonaws.com/test_index/_search?size=2" rel="nofollow noreferrer">http://search-testelasticseach-pkpbravqd4djbi3kjtihsra5ma.us-east-2.es.amazonaws.com/test_index/_search?size=2</a>\' != \'[no URL]\') document.getElementById(\'missing-url\').style.display = \'none\';\nif (\'http\' != \'[unknown protocol]\') document.getElementById(\'missing-protocol\').style.display = \'none\';\n\n\n<hr>\n\n<p>Generated Mon, 23 Jul 2018 11:48:57 GMT by localhost (squid/3.5.23)</p>\n\n\n\n')</p>