# Getting error while connecting to metricbeat on AWS Elasticsearch

**URL:** <https://discuss.elastic.co/t/getting-error-while-connecting-to-metricbeat-on-aws-elasticsearch/238673>\
**Category:** Beats\
**Created:** [June 25, 2020, 12:48pm UTC](https://discuss.elastic.co/t/getting-error-while-connecting-to-metricbeat-on-aws-elasticsearch/238673 "2020-06-25T12:48:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anshumanabhishek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anshumanabhishek/32/70931_2.png) [@Anshumanabhishek](https://discuss.elastic.co/u/Anshumanabhishek)\
**Post date:** [June 25, 2020, 12:48pm UTC](https://discuss.elastic.co/t/getting-error-while-connecting-to-metricbeat-on-aws-elasticsearch/238673/1 "2020-06-25T12:48:44Z")

</div>

Hi,

I am running metricbeat on kubernetes and try to connect AWS Elasticsearch service and getting this error

pipeline/output.go:155 Failed to connect to backoff(elasticsearch([https://xxx-hat333wclpfnnkdkuuigwsti5a.us-east-2.es.amazonaws.com:443](https://xxx-hat333wclpfnnkdkuuigwsti5a.us-east-2.es.amazonaws.com:443))): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license from the /\_license endpoint, Metricbeat requires the default distribution of Elasticsearch. Please make the endpoint accessible to Metricbeat so it can verify the license.: unauthorized access, could not connect to the xpack endpoint, verify your credentials

But when I try to connect same metricbeat with elasticsearch host somewhere else it get connected easily.

Thanks for the help in advance.

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 25, 2020, 1:59pm UTC](https://discuss.elastic.co/t/getting-error-while-connecting-to-metricbeat-on-aws-elasticsearch/238673/2 "2020-06-25T13:59:07Z")

</div>

Actually, AWS Elasticsearch is a totally different product: [https://www.elastic.co/aws-elasticsearch-service](https://www.elastic.co/aws-elasticsearch-service)

---

<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 23, 2020, 3:59pm UTC](https://discuss.elastic.co/t/getting-error-while-connecting-to-metricbeat-on-aws-elasticsearch/238673/3 "2020-07-23T15:59:11Z")

</div>

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