AWS Elasticsearch curl error: No handler found for uri [/] and method [POST]

While running curl -XPOST  to upload files to AWS ES i got the below error:

No handler found for uri [/] and method [POST]

Fix:

#1 First check the health of your AWS Elastic search by running below command and replace bold/colored text with your AWS ES node.

AWS Elasticsearch

curl 'search-dotsways-fwtnmygdotwtsy2wvmumradkqa.us-east-1.es.amazonaws.com/_cat/health?v'

#2 Test simple command

curl -XPUT 'search-dotsways-fwtnmygdotwtsy2wvmumradkqa.us-east-1.es.amazonaws.com/customer/external/1?pretty' -d '
{
"name": "Dotsway"
}'

#3 Be sure you are using a handle 'ex.: /customer/external/'

#4 Confirm that Elasticsearch policy is letting you to access it

#5 In some cases and versions the node should be between single quotes:

curl -XPUT  'search-movies-4f3nw7eiia2xiynjr55a2nao2y.us-west-1.es.amazonaws.com/movies/movie/' -d ..............

 


Subscribe to
for video tutorials updates