title: Command aws logs create-export-task Error (InvalidParameterException) at logGroupName
body: <p>I have a bash script which i am trying to execute the </p>
  
  <pre><code> aws logs create-export-task 
  </code></pre>
  
  <p>command. The <a href="https://docs.aws.amazon.com/cli/latest/reference/logs/create-export-task.html" rel="nofollow noreferrer">command</a> creates a task in an s3 bucket and drop cloudwatch logs within a timestamp interval.</p>
  
  <p>My script has also some variables like the log group name which is needed as an option parameter in the command</p>
  
  <pre><code>logGroup='/aws/lambda/lambda-name'
  </code></pre>
  
  <p>Then I pass it in the command:</p>
  
  <pre><code>createTaskLogs="aws logs create-export-task 
  --log-group-name \"$logGroup\"  \
  ...
  
  echo ${createTaskLogs}
  eval ${createTaskLogs}
  </code></pre>
  
  <p>Plus with some other mandatories options.</p>
  
  <p>The error i get is:</p>
  
  <pre><code> An error occurred (InvalidParameterException) when calling the CreateExportTask operation: 1 
  validation error detected: Value 'C:/Program Files/Git/aws/lambda/lambda-name' at 'logGroupName' failed 
  to satisfy constraint: Member must satisfy regular expression pattern: [\.\-_/#A-Za-z0-9]+
  </code></pre>
  
  <p>As far as i understand bash is interpets the "/aws/lambda/lambda-name" value as a path and convert the first slash to local path C:// . 
  Is there any way to avoid this in bash language or is a fault in the aws logs command ?</p>
  
  <p>Thanks for the future help.</p>