Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

aws-cognitoAWS cognito 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

3,026

周安装

130

GitHub Stars

公开资料未说明

下载量

1,061
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aws-cognito(AWS cognito 部署)
来源仓库:https://github.com/encryptshawn/aws-cognito
安装命令:
openclaw skills install aws-cognito
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install aws-cognito

简介

管理 AWS Cognito 用户池、身份池及认证流程的全生命周期操作。

  • 适用于构建安全的用户注册、登录和第三方联合身份系统。
  • 支持 MFA、令牌处理和社交登录集成等高级身份验证功能。
  • 操作前应明确目标区域与账号权限,防止误删关键身份资源。
  • aws-cognito 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
cognito
description
>

AWS Cognito Skill

This skill helps you build, configure, debug, and manage AWS Cognito resources — user pools, identity pools, app clients, Lambda triggers, federation, and integrations with other AWS services.

Quick Decision: What Does the User Need?

  1. New Cognito setup from scratch → Read references/setup-guide.md, then follow the setup workflow
  2. CDK / CloudFormation / Terraform IaC → Read references/iac-patterns.md for production-ready templates
  3. Authentication flow implementation → Read references/auth-flows.md for SDK code and flow selection
  4. Debugging / troubleshooting → Read references/troubleshooting.md for common issues and fixes
  5. Lambda triggers → Read references/lambda-triggers.md for trigger patterns
  6. Security hardening → Read references/security.md for best practices

Read the relevant reference file(s) before generating any code or configuration. Multiple files may apply — for example, a new CDK setup would benefit from both setup-guide.md and iac-patterns.md.

Core Concepts (Always Keep in Mind)

User Pools vs Identity Pools

These are the two main Cognito components and they serve different purposes:

  • User Pool: A user directory and OIDC identity provider. Handles sign-up, sign-in, MFA, token issuance (ID token, access token, refresh token), and federation with external IdPs. Think of it as "who is this user?"
  • Identity Pool (Federated Identities): Exchanges tokens (from a user pool, social provider, SAML, or OIDC) for temporary AWS credentials (STS). Think of it as "what AWS resources can this user access?"

A common architecture uses both: User Pool authenticates the user and issues tokens → Identity Pool exchanges those tokens for AWS credentials → User accesses S3, DynamoDB, etc.

Feature Plans (Pricing Tiers)

As of late 2024, Cognito uses feature plans instead of the old "advanced security" toggle:

  • Lite: Low-cost, basic auth features. Good for simple apps with fewer MAUs.
  • Essentials (default for new pools): All latest auth features including access-token customization and managed login.
  • Plus: Everything in Essentials plus threat protection (adaptive auth, compromised credential detection).

Always ask the user which plan they need, or default to Essentials for new setups.

Token Types

  • ID Token: Contains user identity claims (email, name, groups, custom attributes). Use for identity verification on your backend.
  • Access Token: Contains scopes and authorized actions. Use for API authorization (e.g., API Gateway Cognito Authorizer).
  • Refresh Token: Long-lived token to obtain new ID/access tokens without re-authentication. Default validity is 30 days.

Workflow: Building a Cognito Solution

Step 1: Clarify Requirements

Before writing any code, determine:

  • Auth methods: Username/password? Email-only? Phone? Social login (Google, Apple, Facebook)? Enterprise SAML/OIDC?
  • MFA: Required, optional, or off? SMS, TOTP authenticator app, or email?
  • Self-service sign-up: Enabled or admin-only user creation?
  • Token usage: Frontend-only (SPA/mobile)? Backend API authorization? Direct AWS resource access?
  • IaC preference: CDK (TypeScript/Python), CloudFormation, Terraform, or console/CLI?
  • Frontend framework: React/Amplify, Next.js, Vue, mobile (iOS/Android), or custom?

Step 2: Design the Architecture

Based on requirements, determine:

  • User Pool configuration (sign-in aliases, attributes, password policy, MFA)
  • App client(s) — public (no secret, for SPAs/mobile) vs confidential (with secret, for server-side)
  • OAuth flows — Authorization Code (with PKCE for public clients), Implicit (legacy, avoid), Client Credentials (M2M)
  • Whether an Identity Pool is needed (only if users need direct AWS resource access)
  • Lambda triggers needed (pre-sign-up, post-confirmation, pre-token-generation, custom auth, etc.)
  • Domain — Cognito-hosted prefix domain or custom domain

Step 3: Implement

Read the appropriate reference files and generate code. Always:

  • Use the latest CDK v2 constructs (aws-cdk-lib/aws-cognito) — never CDK v1
  • For SDK code, use AWS SDK v3 (@aws-sdk/client-cognito-identity-provider) — never v2
  • For frontend, prefer Amplify v6 (aws-amplify) patterns
  • Include proper error handling and token refresh logic
  • Set RemovalPolicy.RETAIN on user pools in production (data loss prevention)
  • Never hardcode secrets — use environment variables or AWS Secrets Manager

Step 4: Security Review

Before declaring done, verify against references/security.md:

  • MFA is enabled (at least optional) for production
  • Password policy meets requirements (minimum 8 chars, complexity rules)
  • Token validity periods are reasonable
  • WAF is considered for public-facing auth endpoints
  • Least-privilege IAM for any Identity Pool roles
  • Client secrets are used for confidential clients
  • HTTPS-only callback URLs

Common Patterns Quick Reference

Cognito + API Gateway

Use a Cognito User Pool Authorizer on API Gateway. The access token is validated automatically. Scopes in the token control which API methods are accessible.

Cognito + AppSync

Configure AMAZON_COGNITO_USER_POOLS authorization on your GraphQL API. Use @auth directives in your schema for fine-grained access control.

Cognito + S3 (via Identity Pool)

User Pool → Identity Pool → IAM role with S3 permissions scoped to ${cognito-identity.amazonaws.com:sub}/* for per-user folders.

Cognito + Lambda (Custom Auth)

Use CUSTOM_AUTH flow with Define, Create, and Verify Auth Challenge triggers for passwordless (magic link, OTP) or multi-step authentication.

Machine-to-Machine (M2M)

Use Client Credentials grant with a resource server and custom scopes. No user interaction — one app authenticating to another.

Important Reminders

  • User pool attributes marked as required at creation CANNOT be changed later. Plan attributes carefully.
  • Custom attributes are always prefixed with custom: (e.g., custom:company).
  • The sub attribute is the unique, immutable user identifier. Use it as your primary key, not email or username.
  • Email/phone verification is separate from sign-in aliases. Auto-verify what you use for sign-in.
  • Cognito has service quotas (e.g., API request rate limits). For high-volume apps, request quota increases proactively.
  • Lambda triggers execute synchronously and have a 5-second timeout. Keep them fast.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

91.12%
按下载量换算967

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills