# Running cURL commands from desktop to access ES on AWS

**URL:** <https://discuss.elastic.co/t/running-curl-commands-from-desktop-to-access-es-on-aws/245501>\
**Category:** Elasticsearch\
**Created:** [August 18, 2020, 10:40pm UTC](https://discuss.elastic.co/t/running-curl-commands-from-desktop-to-access-es-on-aws/245501 "2020-08-18T22:40:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikedee](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mikedee](https://discuss.elastic.co/u/mikedee)\
**Post date:** [August 18, 2020, 10:40pm UTC](https://discuss.elastic.co/t/running-curl-commands-from-desktop-to-access-es-on-aws/245501/1 "2020-08-18T22:40:08Z")

</div>

I am trying to run a scheduled cron job with a cURL command from my desktop terminal, however, when I run the command it returns this error: "curl: (7) Failed to connect to localhost port 9200: Connection refused".

We are running ES on AWS, when executing commands within Kibana, everything works fine. When trying to access remotely from a desktop terminal, we get a returned error. The cURL expression starts with: "curl -XPOST "[http://localhost:9200/entity/\_update\_by\_query?conflicts=proceed](http://localhost:9200/entity/_update_by_query?conflicts=proceed)" -H 'Content-Type:..."

Is there a different configuration for the cURL I should be using, or is there a way to set up a cron scheduled task within the elastic environment?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 18, 2020, 10:46pm UTC](https://discuss.elastic.co/t/running-curl-commands-from-desktop-to-access-es-on-aws/245501/2 "2020-08-18T22:46:26Z")

</div>

Welcome to our community! 😃

You need to change `localhost` to whatever the IP/domain of your cluster on AWS is.

---

<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:** [September 15, 2020, 10:46pm UTC](https://discuss.elastic.co/t/running-curl-commands-from-desktop-to-access-es-on-aws/245501/3 "2020-09-15T22:46:34Z")

</div>

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