Run logstah pipeline continously in Amazon EC2(Amazon Linux 2 AMI)

Hi All,

I have installed logstash in Amazon EC2(Amazon Linux 2 AMI).
I am able to execute the filename.conf file by running the following command
sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/filename.conf --path.settings /etc/logstash/
But as I exit the above command it stops processing filename.conf file.
I would like to continuously keep running the logstash and pipeline process(filename.conf).
I tried to simply starting the logstash using the command
sudo systemctl start logstash
The logstash is active and running but still does not start the pipeline process.
Solution will be a great help.