title: change return type in AWS Lambda function?
body: <p>I am trying out AWS Lambda. </p>
  
  <p>I have enabled Lambda proxy integration.</p>
  
  <p>When I try to query the endpoint with a post request  I get an internal server error.</p>
  
  <p>However if I were to do it in Javascript I get the response as a string. </p>
  
  <p>The function is as follows:</p>
  
  <pre><code>exports.handler = async (event, context) =&gt; {
      // TODO implement
      const response = {
          statusCode: 200,
          headers: {'Control-Access-Allow-Origin': '*', 'Content-Type': 'application/json'},
          body: {
              event,
              context,
          }
      };
      return response;
  };
  </code></pre>