# Logstash and cloud.auth not working correctly

**URL:** <https://discuss.elastic.co/t/logstash-and-cloud-auth-not-working-correctly/233862>\
**Category:** Logstash\
**Created:** [May 22, 2020, 7:56am UTC](https://discuss.elastic.co/t/logstash-and-cloud-auth-not-working-correctly/233862 "2020-05-22T07:56:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![clasyc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clasyc/32/57703_2.png) [@clasyc](https://discuss.elastic.co/u/clasyc)\
**Post date:** [May 22, 2020, 7:56am UTC](https://discuss.elastic.co/t/logstash-and-cloud-auth-not-working-correctly/233862/1 "2020-05-22T07:56:30Z")

</div>

I spent a whole day trying to figure out why my logstash (running on ec2) could not connect into Elastic Cloud endpoint. Added cloud.id and cloud.auth in my logstash.yml, but every time I was getting 401 response.  
After hours and hours of reading documentation and forum I decided to add **user =\> "elastic"**  
**password =\> "password"** in output on logstash.conf and finnaly it worked!

Can someone explain why it is not enough to add _cloud.auth_ and _cloud.id_ ?  
When I already have specified my password in settings file, why do I again need to specify it in every config file?

---

<div class="post-metadata">

**Author:** ![ptamba](https://avatars.discourse-cdn.com/v4/letter/p/7feea3/32.png) [@ptamba](https://discuss.elastic.co/u/ptamba)\
**Post date:** [May 22, 2020, 12:00pm UTC](https://discuss.elastic.co/t/logstash-and-cloud-auth-not-working-correctly/233862/2 "2020-05-22T12:00:49Z")

</div>

logstash.yml controls logstash process execution and behavior. output is part of pipeline config, so it needs to be defined in a pipeline configuration file.

---

<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 19, 2020, 12:00pm UTC](https://discuss.elastic.co/t/logstash-and-cloud-auth-not-working-correctly/233862/3 "2020-06-19T12:00:52Z")

</div>

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