Official agent skill

AWS Auth

by aws in aws/agent-toolkit-for-aws

Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries.

OfficialApache-2.0Auto-check passedBackend & APIs

Install AWS Auth

skills CLI
$ npx skills add aws/agent-toolkit-for-aws --skill aws-auth -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aws/agent-toolkit-for-aws aws-auth --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/core-skills/aws-auth .claude/skills/aws-auth && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
aws-auth
GitHub stars
2.8k
Token cost
~3.4k tokens
SKILL.md length
1,393 words
Files
10 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
Apache-2.0

At a glance

Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries.

  • Tasks that involve OAuth and OpenID Connect
  • SKILL.md covers User Pool vs Identity Pool —…, Critical Warnings, Quick Navigation and Common Workflows, plus 4 more sections
  • Calls npx
  • Tasks that involve Authentication

What it does

AWS Auth is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries. Covers sign-up/sign-in flows and the login page (Cognito-hosted UI / managed login), MFA, password policies, OAuth 2.0 / OIDC flows (auth-code + PKCE, client credentials), social/SAML federation, tokens (ID/access/refresh, rotation, revocation, storage), Cognito Lambda triggers, identity pools (temp AWS creds), and gating API Gateway (or ALB) routes to signed-in users via…

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/api-authorization.md`, `references/identity-pools.md` and `references/lambda-triggers.md`).

It sits in Backend & APIs, covering OAuth and OpenID Connect, Authentication and Microservices. It works with Amazon Web Services, AWS Lambda and Amazon DynamoDB. The repository describes itself as: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve OAuth and OpenID Connect
  • Tasks that involve Authentication
  • Tasks that involve Microservices

Example prompts

  • “/aws-auth”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 188af2f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.aws.amazon.com
    • github.com
    • aws.amazon.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AWS Auth loads about 3.4k tokens when it runs, and up to ~22k if it reads all its reference files. Until then it costs about 255 tokens; SKILL.md has 1,393 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~255
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~22k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aws/agent-toolkit-for-aws at commit 188af2f, republished under its Apache-2.0 licence (© aws). 1,393 words, ~3,438 tokens.

Download SKILL.mdSave it as .claude/skills/aws-auth/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
aws-auth
description
Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries. Covers sign-up/sign-in flows and the login page (Cognito-hosted UI / managed login), MFA, password policies, OAuth 2.0 / OIDC flows (auth-code + PKCE, client credentials), social/SAML federation, tokens (ID/access/refresh, rotation, revocation, storage), Cognito Lambda triggers, identity pools (temp AWS creds), and gating API Gateway (or ALB) routes to signed-in users via Cognito/JWT authorizers. Applies when adding a login or sign-up page, configuring a user pool or app client, choosing user pool vs identity pool, wiring social/SAML, refreshing tokens, requiring sign-in on an API Gateway or ALB, or debugging redirect_uri/token/MFA/CORS/federation errors. Does NOT cover Amplify Gen2 backend definitions (defineAuth, npx ampx → aws-amplify), IAM/STS/Identity Center (→ aws-iam), or API Gateway/Lambda resource config beyond the authorizer (→ aws-serverless).
metadata.version
1

AWS Auth (Amazon Cognito)

Application-level user authentication and authorization with Amazon Cognito and the Amplify client auth libraries. Verify specific limits, quotas, and exact API shapes against official AWS documentation when precision matters; trust the docs over memory when they conflict.

Recommended: The AWS MCP server provides streamlined access to the AWS APIs used in this skill (Cognito user pool/app client/identity pool setup, API Gateway authorizers). If it is unavailable, the AWS CLI commands shown throughout work directly — the skill has no hard dependency on MCP.

When NOT to use: Amplify Gen2 backend code (defineAuth, amplify/auth.ts, npx ampx); IAM policy/role/trust-policy authoring, STS, or IAM Identity Center console SSO; API Gateway route/integration setup or Lambda function implementation (this skill covers only the Cognito/JWT authorizer configuration and the purpose of Cognito Lambda triggers).

User Pool vs Identity Pool — pick first

These are different services that are frequently confused. Most apps need a user pool; add an identity pool only if the client must call AWS services directly.

You need...UseWhy
Sign-up / sign-in, user directory, issue JWTsUser poolIt authenticates users and is an OIDC IdP
The signed-in client to call S3/DynamoDB/etc. directly with AWS credentialsIdentity poolIt exchanges a token for temporary AWS credentials via STS
Both (sign in, then hit AWS resources from the browser/app)User pool → identity poolIdentity pool trusts the user pool as its IdP

If your app only calls your own backend/API, you do not need an identity pool — send the user pool token to your API. See identity-pools.md.

Critical Warnings

update-user-pool-client and set-identity-pool-roles are FULL REPLACE, not partial updates: Any field you omit is reset to its default — calling update-user-pool-client with only the fields you want to change silently wipes ExplicitAuthFlows, token validity, EnableTokenRevocation, refresh-token rotation, and read/write attributes; set-identity-pool-roles likewise replaces the whole roles + RoleMappings structure. Always read-modify-write: describe-user-pool-client (or get-identity-pool-roles) first, then re-send every existing field plus your change. In an agent context the wipe is invisible — the call succeeds and only breaks later when a user hits the missing flow. See managed-login-oauth.md and identity-pools.md.

Don't use the implicit grant for new apps: The implicit grant (response_type=token) is legacy and returns tokens in the URL fragment. Use the authorization code grant with PKCE (response_type=code + code_challenge) for SPAs and mobile — public clients, no client secret. See managed-login-oauth.md.

Don't store refresh tokens in localStorage for high-value apps: localStorage is readable by any injected script (XSS). The Amplify client library defaults to localStorage; switch to cookieStorage, keep refresh-token lifetime short, and enable refresh token rotation + token revocation on the app client. See tokens-and-sessions.md.

Access-token claim customization needs a paid feature plan: The pre token generation trigger customizes the ID token on the entry-level plan (V1), but customizing the access token (V2/V3) requires a paid feature plan — check the Cognito feature plans documentation for which plan currently includes this, as plan names and inclusions can change. Don't assume access-token claims work on the entry-level plan. See lambda-triggers.md.

App client secret + SPA = broken auth: A public client (browser/mobile) must have no client secret. If a secret is set, token calls fail unless a SECRET_HASH is sent, which a browser cannot protect. Generate a secret only for confidential (server-side) clients.

Don't bulk admin-confirm-sign-up UNCONFIRMED users: When users are stuck UNCONFIRMED, prefer resend-confirmation-code so each user re-verifies via confirm-sign-up and proves email ownership (the code likely expired or went to spam). admin-confirm-sign-up flips the status instantly but confirms the account without verifying the email — the attribute stays unverified, which is dangerous when email drives password reset or account linking. Reserve it for trusted/migrated accounts. See troubleshooting.md.

Quick Navigation

You want to...Go to
Create a user pool, sign-up/sign-in, MFA, password policy, app clientsuser-pools.md
Add hosted UI / managed login, OAuth flows, social or SAML login, callback URLs, custom domain (ACM in us-east-1)managed-login-oauth.md
Handle ID/access/refresh tokens, rotation, revocation, session termination (global sign-out vs revoke vs disable)tokens-and-sessions.md
Give the client temporary AWS credentials, guest access, role mappingidentity-pools.md
Protect an API Gateway API with Cognito tokens (and enforce custom claims in the backend)api-authorization.md
Add Cognito login in front of an Application Load Balancer (ALB authenticate-cognito)api-authorization.md
Machine-to-machine (client credentials) auth, resource servers, custom scopesmanaged-login-oauth.md
Create user pool groups and add users to them (cognito:groups, Precedence)user-pools.md
Customize claims, custom auth challenge flows, migrate users, validate sign-uplambda-triggers.md
Add passkey / WebAuthn sign-in (USER_AUTH flow, AllowedFirstAuthFactors, WebAuthn enrollment)passkeys.md
Configure threat protection — compromised-credentials block, adaptive auth (risk-based MFA), log delivery to CloudWatchthreat-protection.md
Something is broken (redirect, token, MFA, CORS, social login)troubleshooting.md

Common Workflows

"Add sign-up and login to my React app" → Create a user pool + a public app client (no secret), enable the hosted UI / managed login with the authorization code grant with PKCE, wire the Amplify client library. See user-pools.md and managed-login-oauth.md.

"Add Google / social login" → Register the social IdP on the user pool, map attributes, add the provider to the app client and hosted UI. See managed-login-oauth.md.

"Only authenticated users should call my API" → HTTP API → JWT authorizer; REST API → Cognito user pools authorizer. See api-authorization.md.

"Let the browser upload to S3 after login" → User pool for sign-in, then an identity pool to vend scoped temporary credentials. See identity-pools.md.

Show full SKILL.md (528 more words)Show less

Troubleshooting

Error/SymptomLikely CauseQuick Fix
redirect_mismatch / redirect to wrong URL after loginCallback URL not registered, or scheme/trailing-slash/case differsAdd the exact callback URL (incl. scheme and path) to the app client's Allowed callback URLs
Token calls fail with "unable to verify secret hash"Client secret set on a public (SPA/mobile) clientRecreate the app client with no secret, or send SECRET_HASH from a confidential client
Users get 401 from API Gateway with a valid tokenWrong token type or audience/issuer mismatchHTTP JWT authorizer: issuer https://cognito-idp.{region}.amazonaws.com/{userPoolId}, audience = app client id; send the token the authorizer expects
CORS errors calling the hosted UI / token endpointBrowser calling /oauth2/token cross-origin, or missing CORS on your APIDo the code exchange with PKCE; don't proxy the token endpoint from the browser
Social login user "already exists" / attribute conflictSame email across providers creates separate usersEnable attribute mapping + account linking; treat email as non-unique across IdPs

Full tables in troubleshooting.md.

Security Considerations

  • Public clients (SPA/mobile): no client secret, authorization code grant with PKCE, request least-privilege scopes.
  • Enable MFA (TOTP or SMS), a strong password policy, and advanced security / threat protection where available.
  • Short access-token lifetime; enable refresh token rotation and token revocation; prefer cookieStorage over localStorage.
  • Identity pools: scope the authenticated IAM role tightly; disable unauthenticated (guest) access unless required.
  • Validate JWTs against the user pool JWKS (iss, aud/client_id, token_use, exp) on every protected request. Use a maintained library such as aws-jwt-verify rather than hand-rolling verification.
  • Set security headers on the app's web pages: Content-Security-Policy (restrict script sources to mitigate token-stealing XSS), Strict-Transport-Security (HSTS), X-Frame-Options/frame-ancestors (clickjacking on login pages), and X-Content-Type-Options: nosniff.
  • Enable logging and monitoring: CloudTrail for Cognito API events (sign-up/sign-in/admin), user pool threat protection (adaptive auth + event logging), CloudWatch alarms on failed/throttled auth, and API Gateway access logging for authorizer decisions.
  • All Cognito and API endpoints are HTTPS/TLS only; enable encryption at rest with a customer-managed KMS key (and restricted key access) on CloudWatch Log groups, SNS topics used for MFA/notifications, and any identity-pool-fronted upload buckets.
  • If using SNS for MFA/notification delivery, enable server-side encryption (KMS) on the topic, and keep SMS/email message content limited to what the recipient needs — don't include more PII than the message requires.
  • References: Amazon Cognito security features (user pools), Amazon Cognito security (top-level, incl. identity pools), and IAM/STS best practices.

Where to Look When This Skill Is Silent

When you need depth beyond this skill — exact parameter shapes, current limits, edge behaviors — fall back to the authoritative AWS sources rather than guessing. Pointers age much slower than content, so this map stays useful without the skill having to grow.

Not Covered By This Skill

  • Amplify Gen2 backend (defineAuth, amplify/auth.ts, npx ampx sandbox).
  • IAM policy/role/trust-policy authoring, STS, IAM Identity Center console SSO.
  • API Gateway route/integration setup and Lambda function implementation (this skill covers only the Cognito/JWT authorizer configuration and the purpose of Cognito Lambda triggers).

© aws, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/core-skills/aws-auth of aws/agent-toolkit-for-aws.

  • SKILL.md
  • references/api-authorization.md
  • references/identity-pools.md
  • references/lambda-triggers.md
  • references/managed-login-oauth.md
  • references/passkeys.md
  • references/threat-protection.md
  • references/tokens-and-sessions.md
  • references/troubleshooting.md
  • references/user-pools.md

Open the folder on GitHubat commit 188af2f

Compare with similar skills

AWS Auth next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AWS Auth compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AWS Auth this skillaws/agent-toolkit-for-aws2.8k—~3.4kAutomated safety check: PassApache-2.0
AWS Serverless Edazxkane/aws-skills3674 repos~3.2kAutomated safety check: PassMIT
AWS Advisordiegosouzapw/awesome-omni-skills159—~4.3kAutomated safety check: PassMIT
AWS Solution Architectalirezarezvani/claude-skills28k1 repos~2.5kAutomated safety check: PassMIT
AWS Serverlessdavila7/claude-code-templates32k8 repos~2kAutomated safety check: PassMIT
AWS Lambda Durable Functionsawslabs/agent-plugins915—~2.3kAutomated safety check: PassApache-2.0

Similar skills

  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • AWS Advisor

    diegosouzapw/awesome-omni-skills

    AWS Advisor workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4.3k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Backend & APIsAuto-check passed
  • AWS Serverless

    davila7/claude-code-templates

    Specialized skill for building production-ready serverless applications on AWS.

    32k GitHub starsUsed in 8 repos~2k tokens
    Backend & APIsAuto-check passed
  • AWS Lambda Durable Functions

    awslabs/agent-plugins

    Official

    Build resilient, long-running, multi-step applications with AWS Lambda durable functions with automatic state persistence, retry logic, and orchestration for long-running executions.

    915 GitHub stars~2.3k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • AWS Lambda

    awslabs/agent-plugins

    Official

    Design, build, deploy, test, and debug serverless applications with AWS Lambda.

    915 GitHub stars~3.1k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from aws/agent-toolkit-for-aws

All 138 skills in this repo
  • Agent Advisor

    aws/agent-toolkit-for-aws

    Official

    Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.

    2.8k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Agents Build

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal.

    2.8k GitHub stars~2.3k tokensUpdated today
    Auto-check: notes
  • Launch With AWS

    aws/agent-toolkit-for-aws

    Official

    Migrates vibe-coded web applications to AWS. An agent skill from aws/agent-toolkit-for-aws.

    2.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated today
    Auto-check passed
  • AWS Marketplace Metering

    aws/agent-toolkit-for-aws

    Official

    Deploys, queries, and debugs AWS Marketplace usage-based (PAYG) metering — the pipeline (ResolveCustomer, BatchMeterUsage, EventBridge via SAM) and querying/debugging metering records, statuses…

    2.8k GitHub stars~18k tokensUpdated today
    Auto-check passed
  • Agents Pay

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying operator-defined spend limits.

    2.8k GitHub stars~6.5k tokensUpdated today
    Auto-check: notes

Categories

Questions about AWS Auth

What does AWS Auth do?

Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries. AWS Auth is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Adds user authentication to web and mobile apps with Amazon Cognito (user pools and identity pools) and the AWS Amplify client auth libraries.

When should I use AWS Auth?

AWS Auth fits situations like: tasks that involve OAuth and OpenID Connect; tasks that involve Authentication; tasks that involve Microservices.

How do I install AWS Auth in Claude Code?

Run `npx skills add aws/agent-toolkit-for-aws --skill aws-auth -a claude-code`. Or copy the skill folder (skills/core-skills/aws-auth in aws/agent-toolkit-for-aws) into .claude/skills/aws-auth in your project. Claude Code loads it when a task matches its description.

How do I install AWS Auth in Codex?

Run `npx skills add aws/agent-toolkit-for-aws --skill aws-auth -a codex`. Or copy the skill folder (skills/core-skills/aws-auth in aws/agent-toolkit-for-aws) into .agents/skills/aws-auth in your project. Codex loads it when a task matches its description.

Can I use AWS Auth in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aws/agent-toolkit-for-aws --skill aws-auth -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aws-auth, .gemini/skills/aws-auth, .github/skills/aws-auth and .opencode/skills/aws-auth in your project.

What does AWS Auth need to run?

Going by SKILL.md and its folder, AWS Auth needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does AWS Auth access the network?

SKILL.md names 3 domains. As links in the text: docs.aws.amazon.com, github.com and aws.amazon.com. This is read from the text; nothing was executed.

Is AWS Auth safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does AWS Auth use?

AWS Auth is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AWS Auth use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to AWS Auth?

Skills that share tags, products or a category with AWS Auth: AWS Serverless Eda (zxkane/aws-skills, 367 stars), AWS Advisor (diegosouzapw/awesome-omni-skills, 159 stars), AWS Solution Architect (alirezarezvani/claude-skills, 28k stars) and AWS Serverless (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AWS Auth?

aws (a GitHub organization, an official publisher) maintains it in aws/agent-toolkit-for-aws, which has 2,825 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on October 7, 2026.

Source: aws/agent-toolkit-for-aws on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.