lib/plugins/aws/customResources/resources/cognitoUserPool/handler.js/create
function create(event, context) {
  const { FunctionName, UserPoolName, UserPoolConfigs } = event.ResourceProperties;
  const { Region, AccountId } = getEnvironment(context);

  const lambdaArn = getLambdaArn(Region, AccountId, FunctionName);

  return findUserPoolByName({ userPoolName: UserPoolName, region: Region }).then(userPool =>
    addPermission({
      functionName: FunctionName,
      userPoolName: UserPoolName,
      region: Region,
      accountId: AccountId,
      userPoolId: userPool.Id,
    }).then(() =>
      updateConfiguration({
        lambdaArn,
        userPoolName: UserPoolName,
        userPoolConfigs: UserPoolConfigs,
        region: Region,
      })
    )
  );
}