title: AWS Lambda error on Cognito User Pool trigger
body: <p>I'm trying to insert a record into DynamoDB invoking "Pre sign-up" trigger of Cognito User Pool.</p>
  
  <p>Lambda function is pretty simple for testing purposes but there is always an error in client application on AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool.signUp call</p>
  
  <p><strong>Use case 1</strong></p>
  
  <p>Lambda body:</p>
  
  <pre><code>console.log('Received event:', JSON.stringify(event, null, 2));
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON
  </code></pre>
  
  <p><strong>Use case 2</strong></p>
  
  <p>Lambda body:</p>
  
  <pre><code>callback("null", "success");
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON
  </code></pre>
  
  <p><strong>Use case 3</strong></p>
  
  <p>Lambda body:</p>
  
  <pre><code>new AWS.DynamoDB.DocumentClient().put(params, callback);
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>InvalidLambdaResponseException: Invalid cognito sign in version. Version should be 1
  </code></pre>
  
  <p>So, any ideas what might be wrong?</p>
  
  <p>Could the latest error might be related to the beta status of Cognito User Pool?</p>
  
  <p>P.S. I will provide more details if needed. Thanks in advance.</p>