def createCognitoUser()

in cognitoHandler.py [0:0]


    def createCognitoUser(self, username: str, password: str, 
                    user_pool_id: str, app_client_id: str) -> None:
        #modify user pool to allow user signup
        respUpdate = self.client.update_user_pool(
            UserPoolId=user_pool_id,
            AdminCreateUserConfig=
                {
                'AllowAdminCreateUserOnly': False,
                }
        )
        if respUpdate:
         # initial sign up
            respSignup = self.client.sign_up(
                ClientId=app_client_id,
                Username=username,
                Password=password,
                UserAttributes=[
                    {
                        'Name': 'email',
                        'Value': 'test@test.com'
                    },
                ]
            )
        if respSignup:
            # then confirm signup
            respConfirm = self.client.admin_confirm_sign_up(
                UserPoolId=user_pool_id,
                Username=username
            )    
            if respConfirm: return True
        else:
            return False