title: creating export task in aws cloudwatch log
body: <p>I am trying to create export task for moving the cloudwatch logs more than 30 day to move to s3 bucket. I am currently following this AWS article <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasks.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasks.html</a>. I am stuck with the creation of export task. when I ran the below command</p>
  <pre><code> aws logs create-export-task --profile CWLExportUser --task-name &quot;my-log-group-$(date +%Y-%m-%d)&quot; --log-group-name &quot;/aws/lambda/AMICreate&quot; --from  60  --to  155520000 --destination &quot;diego-cw-logs&quot; --destination-prefix &quot;export-task-output&quot;
  </code></pre>
  <p>I am getting below error</p>
  <pre><code>An error occurred (InvalidParameterException) when calling the CreateExportTask operation: Specified time range of '60' and '155520000' is not valid. Please make sure the values are within the retention period of the log groups and from value is lesser than the to values
  </code></pre>
  <p>I am missing something. It would be great if some one render their hands to fix the issue.</p>
  <p>Warmly,
  Muneesh</p>