export async function onEventHandler()

in source/aws-bootstrap-kit/lib/validate-email-handler/index.ts [31:48]


export async function onEventHandler(
  event: any
): Promise<OnEventResponse | void> {
  console.log("Event: %j", event);

  if (event.RequestType === "Create") {
    const ses = new SES();
    await ses
      .verifyEmailIdentity({ EmailAddress: event.ResourceProperties.email })
      .promise();

    return { PhysicalResourceId: 'validateEmail' };
  }

  if (event.RequestType === "Delete") {
    return { PhysicalResourceId: event.PhysicalResourceId };
  }
}