aws-cognito
БесплатноБез исполняемых скриптовНе проверенAmazon Cognito is AWS's managed user directory and sign-in service. Use it to create user pools for sign-up and sign-in, configure identity pools for AWS…
Об этом скилле
AWS Cognito
Overview
Amazon Cognito provides authentication, authorization, and user management. User Pools handle sign-up/sign-in and issue JWTs. Identity Pools grant temporary AWS credentials to authenticated (or guest) users.
Since late 2024 each user pool has a feature plan (--user-pool-tier LITE | ESSENTIALS | PLUS); new pools default to Essentials. The plan decides which features exist (for example, managed login and passwordless sign-in need Essentials or Plus; check the feature plans page before relying on one).
Instructions
Core Concepts
- User Pool — user directory for sign-up, sign-in, and token issuance
- Identity Pool — maps authenticated users to temporary AWS credentials
- App Client — configuration for an application connecting to a user pool
- JWT Tokens — ID token (user info), access token (scopes), refresh token
- Managed login / Hosted UI — pre-built sign-in pages with OAuth2/OIDC support (managed login is the newer branded version, chosen per domain with
--managed-login-version 2; classic Hosted UI is version 1) - Federation — sign in via Google, Facebook, Apple, SAML, or OIDC providers
User Pool Setup
# Create a user pool
aws cognito-idp create-user-pool \
--pool-name app-users-prod \
--auto-verified-attributes email \
--username-attributes email \
--policies '{
"PasswordPolicy": {
"MinimumLength": 12,
"RequireUppercase": true,
"RequireLowercase": true,
"RequireNumbers": true,
"RequireSymbols": false
}
}' \
--schema '[
{"Name":"email","Required":true,"Mutable":true},
{"Name":"name","Required":true,"Mutable":true},
{"Name":"company","AttributeDataType":"String","Mutable":true}
]' \
--user-pool-tier ESSENTIALS \
--email-configuration EmailSendingAccount=COGNITO_DEFAULT
Turn on optional MFA with an authenticator app (TOTP) in a second call:
aws cognito-idp set-user-pool-mfa-config \
--user-pool-id us-east-1_ABC123 \
--software-token-mfa-configuration Enabled=true \
--mfa-configuration OPTIONAL
# Create an app client (create the Google identity provider below first, or drop Google here; no secret for SPA/mobile). ALLOW_USER_PASSWORD_AUTH is only for the
# boto3 example below; drop it for browser apps that use SRP or the hosted UI
aws cognito-idp create-user-pool-client \
--user-pool-id us-east-1_ABC123 \
--client-name web-app \
--no-generate-secret \
--explicit-auth-flows ALLOW_USER_SRP_AUTH ALLOW_USER_PASSWORD_AUTH ALLOW_REFRESH_TOKEN_AUTH \
--supported-identity-providers COGNITO Google \
--callback-urls '["https://app.northwindparcels.com/callback","http://localhost:3000/callback"]' \
--logout-urls '["https://app.northwindparcels.com/logout"]' \
--allowed-o-auth-flows code \
--allowed-o-auth-scopes openid email profile \
--allowed-o-auth-flows-user-pool-client
User Management
# Create a user (admin)
aws cognito-idp admin-create-user \
--user-pool-id us-east-1_ABC123 \
--username [email protected] \
--user-attributes Name=email,[email protected] Name=name,Value="Alice Johnson" \
--temporary-password "TempPass123!" \
--message-action SUPPRESS
# Confirm a self-registered user (status UNCONFIRMED) without the emailed code.
# Users made by admin-create-user cannot be confirmed this way; they start as FORCE_CHANGE_PASSWORD
aws cognito-idp admin-confirm-sign-up \
--user-pool-id us-east-1_ABC123 \
--username [email protected]
# Add user to a group
aws cognito-idp admin-add-user-to-group \
--user-pool-id us-east-1_ABC123 \
--username [email protected] \
--group-name admins
# List users
aws cognito-idp list-users \
--user-pool-id us-east-1_ABC123 \
--filter 'email ^= "alice"' \
--limit 10
Authentication Flow
# Sign up and sign in with boto3
import boto3
client = boto3.client('cognito-idp', region_name='us-east-1')
CLIENT_ID = '3n4b5urk1ft4fl3mg5e62d9ado' # app client id from create-user-pool-client
# Sign up
client.sign_up(
ClientId=CLIENT_ID,
Username='[email protected]',
Password='SecurePass123!',
UserAttributes=[
{'Name': 'email', 'Value': '[email protected]'},
{'Name': 'name', 'Value': 'Bob Smith'}
]
)
# Confirm sign up (with code from email)
client.confirm_sign_up(
ClientId=CLIENT_ID,
Username='[email protected]',
ConfirmationCode='123456'
)
# Sign in (needs ALLOW_USER_PASSWORD_AUTH on the app client; boto3 has no built-in SRP)
response = client.initiate_auth(
ClientId=CLIENT_ID,
AuthFlow='USER_PASSWORD_AUTH',
AuthParameters={
'USERNAME': '[email protected]',
'PASSWORD': 'SecurePass123!'
}
)
id_token = response['AuthenticationResult']['IdToken']
access_token = response['AuthenticationResult']['AccessToken']
refresh_token = response['AuthenticationResult']['Refre
Установить aws-cognito в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл aws-cognito?
Amazon Cognito is AWS's managed user directory and sign-in service. Use it to create user pools for sign-up and sign-in, configure identity pools for AWS access, handle JWT tokens, set up social federation with Google and Facebook, and secure APIs with Cognito authorizers.
Как установить скилл aws-cognito?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл aws-cognito запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic