title: Is it possible to modify AWS Cognito user attributes in the Lambda triggers
body: <p>Having a look at the AWS documentation,</p>
  
  <p><a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html#cognito-user-pools-lambda-trigger-syntax-pre-signup" rel="noreferrer">https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html#cognito-user-pools-lambda-trigger-syntax-pre-signup</a></p>
  
  <p>you have the following paramaters available in the  <strong><em>Pre Sign-up</em></strong> Lambda fuction:</p>
  
  <pre><code>"request": {
    "userAttributes": {
      "string": "string",
      ....
  },
  "validationData": {&lt;validation data as key-value (String, String) pairs, from the client&gt;}
  </code></pre>
  
  <p>is there a way to modify or add additional <strong><em>userAttributes</em></strong> the the event object?</p>
  
  <p>for example:</p>
  
  <pre><code>// Modify an existing username...
  event.request.userAttributes.name.ucfirst();
  
  // Add an additional attribute...
  event.request.userAttributes.nickname = "ANY_NAME";
  
  
  callback(null, event);
  </code></pre>