This handles AWS Cognito user authentication and authorization, covering both user pools for sign-up/sign-in and identity pools for temporary AWS credentials. You'll reach for it when setting up OAuth flows, managing user attributes, or integrating social logins. The source walks through practical patterns like creating pools with password policies, implementing SRP authentication (the secure way, not just username/password), and getting temporary credentials for API access. One thing to note: Cognito's token handling gets fiddly fast, especially the secret hash calculation for app clients, so having the Python snippets for sign-up and auth flows saves you from fumbling through docs. The security advice is solid too: enable MFA, keep token lifetimes short, and never expose client secrets in frontend code.

skills.sh installs
188
GitHub stars
1.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add itsmostafa/aws-agent-skills --skill cognito --agent claude-code

Installs into .claude/skills of the current project.

Files

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

TokenPurposeLifetime
ID TokenUser identity claims1 hour
Access TokenAPI authorization1 hour
Refresh TokenGet new ID/Access tokens30 days (configurable)

Common Patterns

Create User Pool

AWS CLI:

Sponsors

Details

Repository
github.com/itsmostafa/aws-agent-skills
Categories
Backend & APIs, Security, AI & Agent Building, Cloud & Infrastructure
License
MIT
First seen
Jun 3, 2026

More from itsmostafa/aws-agent-skills

All 18
1martinholovsky avatarkanidm-expertmartinholovsky/claude-skills-generatorExpert in Kanidm modern identity management system specializing in user/group management, OAuth2/OIDC, LDAP, RADIUS, SSH key management, WebAuthn, and MFA. Deep188skills.sh installs
2johnrogers avatarsqlite-datajohnrogers/claude-swift-engineeringUse when working with SQLiteData library (@Table, @FetchAll, @FetchOne macros) for SQLite persistence, queries, writes, migrations, or CloudKit private database187skills.sh installs
3vm0-ai avatargmailvm0-ai/vm0-skillsGmail API for email management. Use when user says "check email", "send email", "search Gmail", "my inbox", or mentions Gmail messages.187skills.sh installs
4oguzhan18 avatarangular-httpoguzhan18/angular-ecosystem-skillsALWAYS use when working with Angular HttpClient, HTTP requests, interceptors, error handling, or API communication in Angular applications.185skills.sh installs
5blessonism avatarmineru-extractblessonism/openclaw-search-skillsUse the official MinerU (mineru.net) parsing API to convert a URL (HTML pages like WeChat articles, or direct PDF/Office/image links) into clean Markdown + stru184skills.sh installs
6openserv-labs avataropenserv-multi-agent-workflowsopenserv-labs/skillsMulti-agent workflow examples to work together on the OpenServ Platform. Covers agent discovery, multi-agent workspaces, task dependencies, and workflow orchest183skills.sh installs