# APM Server -\> AWS Elasticsearch Service: "cannot retrieve the elasticsearch license: unauthorized access, could not connect to the xpack endpoint, verify your credentials"

**URL:** <https://discuss.elastic.co/t/apm-server-aws-elasticsearch-service-cannot-retrieve-the-elasticsearch-license-unauthorized-access-could-not-connect-to-the-xpack-endpoint-verify-your-credentials/207759>\
**Category:** APM\
**Created:** [November 13, 2019, 6:00pm UTC](https://discuss.elastic.co/t/apm-server-aws-elasticsearch-service-cannot-retrieve-the-elasticsearch-license-unauthorized-access-could-not-connect-to-the-xpack-endpoint-verify-your-credentials/207759 "2019-11-13T18:00:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hickeroar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hickeroar/32/57628_2.png) [@hickeroar](https://discuss.elastic.co/u/hickeroar)\
**Post date:** [November 13, 2019, 9:24pm UTC](https://discuss.elastic.co/t/apm-server-aws-elasticsearch-service-cannot-retrieve-the-elasticsearch-license-unauthorized-access-could-not-connect-to-the-xpack-endpoint-verify-your-credentials/207759/3 "2019-11-13T21:24:58Z")

</div>

> [@APM and AWS Elasticsearch](https://discuss.elastic.co/t/apm-and-aws-elasticsearch/131361):
>
> Has anyone setup an APM server to connect to AWS ES? Is it compatible? If so, help a newbie out with the output configuration?

This thread seems to say that it's possible just by putting in the hostname of the aws instance and proper port.

Has that compatibility been lost along the way?

---

_[View the full topic](https://discuss.elastic.co/t/apm-server-aws-elasticsearch-service-cannot-retrieve-the-elasticsearch-license-unauthorized-access-could-not-connect-to-the-xpack-endpoint-verify-your-credentials/207759)._
