itsmostafa/aws-agent-skills/cognito
- community
Checking that the SKILL.md file is still in the repository.
AWS Cognito user authentication and authorization service. Use when setting up user pools, configuring identity pools, implementing OAuth flows, managing user attributes, or integrating with social identity providers.
Install
npx vskill@latest install itsmostafa/aws-agent-skills/cognitoSKILL.md
AWS Cognito
Amazon Cognito provides authentication, authorization, and user management for web and mobile applications. Users can sign in directly or through federated identity providers.
Table of Contents
Core Concepts
User Pools
User directory for sign-up and sign-in. Provides:
- User registration and authentication
- OAuth 2.0 / OpenID Connect tokens
- MFA and password policies
- Customizable UI and flows
Identity Pools (Federated Identities)
Provide temporary AWS credentials to access AWS services. Users can be:
- Cognito User Pool users
- Social identity (Google, Facebook, Apple)
- SAML/OIDC enterprise identity
- Anonymous guests
Tokens
| Token | Purpose | Lifetime | |
|---|---|---|---|
| ID Token | User identity claims | 1 hour | |
| Access Token | API authorization | 1 hour | |
| Refresh Token | Get new ID/Access tokens | 30 days (configurable) |
Common Patterns
Create User Pool
AWS CLI:
Create App Client
Sign Up User
Confirm Sign Up
Authenticate User
Refresh Tokens
Create Identity Pool
Get AWS Credentials
CLI Reference
User Pool
| Command | Description | |
|---|---|---|
aws cognito-idp create-user-pool | Create user pool | |
aws cognito-idp describe-user-pool | Get pool details | |
aws cognito-idp update-user-pool | Update pool settings | |
aws cognito-idp delete-user-pool | Delete pool | |
aws cognito-idp list-user-pools | List pools |
Users
| Command | Description | |
|---|---|---|
aws cognito-idp admin-create-user | Create user (admin) | |
aws cognito-idp admin-delete-user | Delete user | |
aws cognito-idp admin-get-user | Get user details | |
aws cognito-idp list-users | List users | |
aws cognito-idp admin-set-user-password | Set password | |
aws cognito-idp admin-disable-user | Disable user |
Authentication
| Command | Description | |
|---|---|---|
aws cognito-idp initiate-auth | Start authentication | |
aws cognito-idp respond-to-auth-challenge | Respond to MFA | |
aws cognito-idp admin-initiate-auth | Admin authentication |
Best Practices
Security
- Enable MFA for all users (at least optional)
- Use strong password policies
- Enable advanced security features (adaptive auth)
- Verify email/phone before allowing sign-in
- Use short token lifetimes for sensitive apps
- Never expose client secrets in frontend code
User Experience
- Use hosted UI for quick implementation
- Customize UI with CSS
- Implement proper error handling
- Provide clear password requirements
Architecture
- Use identity pools for AWS resource access
- Use access tokens for API Gateway
- Store refresh tokens securely
- Implement token refresh before expiry
Troubleshooting
User Cannot Sign In
Causes:
- User not confirmed
- Password incorrect
- User disabled
- Account locked (too many attempts)
Debug:
Token Validation Failed
Causes:
- Token expired
- Wrong user pool/client ID
- Token signature invalid
Validate JWT:
Hosted UI Not Working
Check:
- Callback URLs configured correctly
- Domain configured for user pool
- OAuth settings enabled
Rate Limiting
Symptom: TooManyRequestsException
Solutions:
- Implement exponential backoff
- Request quota increase
- Cache tokens appropriately
References
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cognito/SKILL.md
Popularity
- Repository stars
- 1,050
- Repository forks
- 437
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itsmostafa/aws-agent-skills/cognito)