title: Manually sign AppSync URL to use in Lambda gives bad signature error
body: <p>In a Lambda, I would like to sign my <code>AppSync</code> endpoint with <code>aws-signature-v4</code> in order to use it for a mutation.</p>
  
  <p><strong>The URL generated seems to be ok but it gives me the following error when I try it</strong>:</p>
  
  <p><code>{
    "errors" : [ {
      "errorType" : "InvalidSignatureException",
      "message" : "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. etc...
    } ]
  }
  </code></p>
  
  <p>Here is my lambda function</p>
  
  <pre class="lang-js prettyprint-override"><code>import { Context, Callback } from 'aws-lambda';
  import { GraphQLClient } from 'graphql-request';
  
  const v4 = require('aws-signature-v4');
  
  export async function handle(event: any, context: Context, callback: Callback) {
    context.callbackWaitsForEmptyEventLoop = false;
  
    const url = v4.createPresignedURL(
      'POST',
      'xxxxxxxxxxxxxxxxx.appsync-api.eu-west-1.amazonaws.com',
      '/graphql',
      'appsync',
      'UNSIGNED-PAYLOAD',
      {
        key: 'yyyyyyyyyyyyyyyyyyyy',
        secret: 'zzzzzzzzzzzzzzzzzzzzz',
        region: 'eu-west-1'
      }
    );
  
    const mutation = `{
      FAKEviewProduct(title: "Inception") {
        productId
      }
    }`;
  
    const client = new GraphQLClient(url, {
      headers: {
        'Content-Type': 'application/graphql',
        action: 'GetDataSource',
        version: '2017-07-25'
      }
    });
  
    try {
      await client.request(mutation, { productId: 'jfsjfksldjfsdkjfsl' });
    } catch (err) {
      console.log(err);
      callback(Error());
    }
  
    callback(null, {});
  }
  </code></pre>
  
  
  
  <p>I got my <code>key</code> and <code>secret</code> by creating a new user and <code>Allowing</code> him <code>appsync:GraphQL</code> action.</p>
  
  <p><strong>What am I doing wrong?</strong></p>