title: AWS Cognito with Lambda for custom validation
body: <p>Using AWS Lambda with Cognito we can autoVerify email using below code.</p>
  
  <pre><code>event.response.autoConfirmUser = true;
  event.response.autoVerifyEmail = true;
  </code></pre>
  
  <p>How can I do custom request validation here? </p>
  
  <p>Like if I want to send PROMO CODE while cognito signup then can I have a code to validate this promo code and reject registration request if it is invalid promocode.</p>