# Can't connect to AWS Elasticsearch from EC2

**URL:** <https://discuss.elastic.co/t/cant-connect-to-aws-elasticsearch-from-ec2/252859>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [October 21, 2020, 2:55pm UTC](https://discuss.elastic.co/t/cant-connect-to-aws-elasticsearch-from-ec2/252859 "2020-10-21T14:55:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CatalinM](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@CatalinM](https://discuss.elastic.co/u/CatalinM)\
**Post date:** [October 21, 2020, 2:55pm UTC](https://discuss.elastic.co/t/cant-connect-to-aws-elasticsearch-from-ec2/252859/1 "2020-10-21T14:55:07Z")

</div>

I've did a lot of digging and I learned that I need to use an OSS version of Heartbeat to achieve this. As such, I removed the version I had initially and installed an OSS version (initially 7.9.2, but also tried 7.7.0).

I'm still getting xpack related errors (the one below is from setup, but I get the same when I just run it)

```
401 Unauthorized: {"Message":"Your request: '/_xpack' is not allowed."}
Exiting: request checking for ILM availability failed: 401 Unauthorized: {"Message":"Your request: '/_xpack' is not allowed."}

```

Not sure how to continue with this, so any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![CatalinM](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@CatalinM](https://discuss.elastic.co/u/CatalinM)\
**Post date:** [October 22, 2020, 11:17am UTC](https://discuss.elastic.co/t/cant-connect-to-aws-elasticsearch-from-ec2/252859/2 "2020-10-22T11:17:35Z")

</div>

Found the solution, after almost randomly scouring the Beats Github issue list. One needs to disable ILM in the setup

```
setup.ilm.enabled: false
```

---

<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:** [November 19, 2020, 1:17pm UTC](https://discuss.elastic.co/t/cant-connect-to-aws-elasticsearch-from-ec2/252859/3 "2020-11-19T13:17:40Z")

</div>

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