# How to run logstash config file on Amazon ec2 instance

**URL:** <https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418>\
**Category:** Logstash\
**Created:** [February 25, 2018, 11:58pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418 "2018-02-25T23:58:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfastep](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@alfastep](https://discuss.elastic.co/u/alfastep)\
**Post date:** [February 25, 2018, 11:58pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418/1 "2018-02-25T23:58:37Z")

</div>

I have used systemctl start logstash to get logstash up and running. I was wondering how I can run a logstash config file to ingest data into elastisearch on the ec2 instance?

---

<div class="post-metadata">

**Author:** ![abhivj7b](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@abhivj7b](https://discuss.elastic.co/u/abhivj7b)\
**Post date:** [February 26, 2018, 4:26am UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418/2 "2018-02-26T04:26:11Z")

</div>

You can configure static IP at EC2 instance and then you can use the same at .yml file of beats and logstash.

---

<div class="post-metadata">

**Author:** ![alfastep](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@alfastep](https://discuss.elastic.co/u/alfastep)\
**Post date:** [February 26, 2018, 7:32pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418/3 "2018-02-26T19:32:16Z")

</div>

When I run:  
systemctl start logstash

and then I run:  
systemctl status logstash

I get the following message:  
logstash.service - logstash  
Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: disabled)  
Active: failed (Result: start-limit) since Mon 2018-02-26 19:29:10 UTC; 1s ago  
Process: 2016 ExecStart=/usr/share/logstash/bin/logstash --path.settings /etc/logstash (code=exited, status=1/FAILURE)  
Main PID: 2016 (code=exited, status=1/FAILURE)

Any help or idea of why this could be happening?

---

<div class="post-metadata">

**Author:** ![abhivj7b](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@abhivj7b](https://discuss.elastic.co/u/abhivj7b)\
**Post date:** [February 27, 2018, 3:11pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418/4 "2018-02-27T15:11:37Z")

</div>

Please try this

$logstashhome/config/startup.options file? Please set LC\_USER and LC\_GROUP to existed account and group .

# user and group id to be invoked as

**LS\_USER=elk-test**  
**LS\_GROUP=elk-test**

---

<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:** [March 27, 2018, 3:11pm UTC](https://discuss.elastic.co/t/how-to-run-logstash-config-file-on-amazon-ec2-instance/121418/5 "2018-03-27T15:11:40Z")

</div>

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