Example
To create the AWSCognitoHandler, initialize it with AWS credentials or an IAM role. The handler automatically assumes the role (if provided) and initializes a Cognito client.User Pool Management:
List User Pools: Retrieves all Cognito user pools in the AWS account.
Creates a new user pool with optional policies and schema.
Fetches metadata and configuration of a specific user pool.
User Pool Management:
Create User (Admin): Creates a new user with a temporary password.
Retrieves user attributes and status.
Controls user access within the pool.
Removes a user permanently.
Group Management:
Create Group: Creates a new group in a user pool.
Assigns a user to a group.
Lists all groups in a user pool.
Authentication & Authorization:
Initiate Authentication: Starts an authentication flow (USER_PASSWORD_AUTH, REFRESH_TOKEN_AUTH, etc.).
Handles MFA or password challenges.
Signs the user out from all active sessions.
MFA & Security:
Set User MFA Preference: Configures MFA for a user.
Verifies an MFA token.
Identity Providers (IdP)
Create Identity Provider: Adds an external IdP (Google, SAML, OIDC).
Lists all configured IdPs.
Session & Resource Management:
Tag Resources: Adds tags to a Cognito resource.
Gracefully releases underlying AWS resources.

