I've setup Filebeat on AWS Amazon Linux 2 AMI using the setup instruction here : (Filebeat quick start: installation and configuration | Filebeat Reference [7.16] | Elastic)
So basically :
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.16.2-linux-x86_64.tar.gz
tar xzvf filebeat-7.16.2-linux-x86_64.tar.gz
To start filebeat per instructions use:
sudo ./filebeat -e
That is not running as a service or in the background so if you get out of that SSH session filebeat stops parsing the logs.
For DEB or RPM you can use sudo service filebeat start , but that does not work for aws linux ami.
How do you setup filebeat to run as a service for aws linux ?