# Unable to connect to AWS Elasticsearch Service Domain from Metricbeat

**URL:** https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 31, 2019, 7:49am UTC](https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677 "2019-05-31T07:49:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sukrity\_Chakraborty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukrity_chakraborty/32/47215_2.png) [@Sukrity\_Chakraborty](https://discuss.elastic.co/u/Sukrity_Chakraborty)
#### Post date: [May 31, 2019, 7:49am UTC](https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677/1 "2019-05-31T07:49:33Z")

</div>

Hi All,

I have configured a new Elasticsearch Service domain in AWS following the steps mentioned in the tutorial. I have set open access to the domain as of now.  
I installed and configured Metricbeat on one of my EC2 servers following the instructions. However when I am trying to setup the Metricbeat in the last step, I am getting the following error.

Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [https://aws-es-endpoint:443](https://aws-es-endpoint:443): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license: unauthorized access, could not connect to the xpack endpoint, verify your credentials]

Please can you help me understand what is the issue.

Thanks and Regards,  
Sukrity

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [May 31, 2019, 8:20am UTC](https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677/2 "2019-05-31T08:20:02Z")

</div>

I suspect you need to download and use the oss distribution.

---

<div class="post-metadata">

### Author: ![Sukrity\_Chakraborty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sukrity_chakraborty/32/47215_2.png) [@Sukrity\_Chakraborty](https://discuss.elastic.co/u/Sukrity_Chakraborty)
#### Post date: [May 31, 2019, 10:57am UTC](https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677/3 "2019-05-31T10:57:18Z")

</div>

Thanks. That solved the issue.

Regards,  
Sukrity

---

<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 28, 2019, 10:57am UTC](https://discuss.elastic.co/t/unable-to-connect-to-aws-elasticsearch-service-domain-from-metricbeat/183677/4 "2019-06-28T10:57:19Z")

</div>

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