title: aws cli lambda-Could not parse request body into json
body: <p>I have created aws lambda function in .net core and deployed.
  I have tried executing function in aws console with test case and its working. but i am not able achieve the same with cli command</p>
  <pre><code>aws lambda invoke --function-name &quot;mylambda&quot; --log-type Tail --payload file://D:/Files/lamdainputfile.json file://D:/Files/response.txt
  </code></pre>
  <p>i got getting error with cli command</p>
  <pre><code>An error occurred (InvalidRequestContentException) when calling the Invoke operation: Could not parse request body into json: Unexpected character ((CTRL-CHAR, code 138)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
   at [Source: (byte[])&quot;�zn�]t�zn�m�&quot;; line: 1, column: 2]
  </code></pre>
  <p>I tried passing json</p>
  <pre><code>aws lambda invoke --function-name &quot;mylambda&quot; --log-type Tail --payload &quot;{'input1':'100', 'input2':'200'}&quot; file://D:/Files/response.txt
  </code></pre>
  <p>but it's not working</p>
  <p>This lambda function is executing aws console with test case and giving correct result. I have added same input in local json file and tried with cli command.</p>
  <p>Json input:</p>
  <pre><code>{
    &quot;input1&quot;: &quot;100&quot;,
    &quot;input2&quot;: &quot;200&quot;
  }
  </code></pre>
  <p>EDIT:</p>
  <p>After correction in inline json i am getting error for output file</p>
  <pre><code>Unknown options: file://D:/Files/response.txt
  </code></pre>
  <p>is there any command to print output in cli only?</p>