Logstash output to EC2

How to you set up Logstash to output to an ec2 instance in AWS? I want to use Log stash to grab input log files from S3 bucket and send the output cvs files to an eC2 instance via Logstash. Basically use Logstash as a data pipeline (or log forwarder) using the mechanism to keep track of the new files in S3 and using the scheduler to send new files every 10 minutes to ec2. How to config Logstash to do this?

Use an s3 input for reading the input files, a csv filter for parsing the files, and whatever output you need for your EC2 instance. What do you intend to run on the EC2 machine to receive the messages?