title: How to read the POST parameters in a serverless application with Lambda?
body: <p>I'm submitting a form to a Lambda function deployed by serverless, here's the yml:</p>
  
  <pre><code>functions:
    hello:
      handler: handler.hello
      events:
        - http: POST hello
  </code></pre>
  
  <p>Now my hello function is: </p>
  
  <pre><code>module.exports.hello = (event, context, callback) =&gt; {
    const response = {
      statusCode: 200,
      body: JSON.stringify({
        message: 'Go Se222rverless v1.0! Your function executed successfully!',
        input: event,
      }),
    };
  
    callback(null, response);
  };
  </code></pre>
  
  <p>I can see on the output that the variables were passed, but they are stored in the event.body property as such:</p>
  
  <pre><code> "body":"email=test%40test.com&amp;password=test12345"
  </code></pre>
  
  <p>Now I can access this string, but I can't read individual variables from it, unless I do some regex transformation which, I believe, would not be the case in such a modern stack such as serverless/aws. </p>
  
  <p>What am I missing? How do I read the individual variables?</p>