Moving CloudWatch logs to S3 in AWS
<p>I have some logs in CloudWatch and everyday, I keep getting new logs. Now, I want to store today's and yesterday's logs in Cloud Watch itself but logs that are 2 days older have to be moved to S3.</p>

<p>I have tried using the CLI by following the below link :</p>

<pre><code>http://docs.aws.amazon.com/cli/latest/reference/logs/create-export-task.html
</code></pre>

<p>In this link, two options have been mentioned : <strong>--from</strong> and <strong>--to</strong></p>

<pre><code>--from option only exports the logs after that time.
--to option does not export the logs after that time.
</code></pre>

<p>By using these, I can achieve my requirement but, I have to type in the command everyday as the --from and --to option values change.</p>

<p>So, instead of typing the command daily, is there an alternative option which could do the job daily without me interfering?</p>