Trigger from Cognito

🔥 Doc

🔥 Code

import { CognitoUserPoolTriggerEvent } from 'aws-lambda';

export const handler = async (
  event: CognitoUserPoolTriggerEvent,
): Promise<void> => {
  console.log(event);

  return;
};

🔥 Example event

{
  "version": "string",
  "triggerSource": "string",
  "region": "AWSRegion",
  "userPoolId": "string",
  "userName": "string",
  "callerContext": {
    "awsSdkVersion": "string",
    "clientId": "string"
  },
  "request": {
    "userAttributes": {
      "string": "string"
    }
  },
  "response": {}
}

Last updated