talira

Amazon Cognito

Implement secure, scalable authentication and access control for users, AI agents, and microservices in minutes

servicefree

Amazon Cognito is AWS's identity service for web and mobile apps. User pools are a managed user directory, OpenID Connect provider and OAuth 2.0 authorization server: users sign in directly, with Google, Apple, Facebook or Amazon, or through a company's SAML or OIDC provider, and the app or API gets one standard set of JWTs. Identity pools exchange those tokens (or none, for guests) for temporary AWS credentials scoped by IAM roles and attributes. User pools come in three feature plans: Lite for basic sign-in with the classic hosted UI, Essentials (the default) with managed login pages, passkeys, passwordless one-time codes, access token customization and session management, and Plus, which adds protection against compromised credentials and risky sign-ins with exportable activity logs. Lambda triggers customize sign-up, sign-in, migration and tokens, client-credentials tokens authorize services and AI agents, and it works with Amazon API Gateway, AWS Lambda and AWS WAF. AWS says it processes more than 100 billion authentications a month.

Problems it solves

  • add sign-up and sign-in to my web and mobile app without building and securing my own user database
  • let users sign in with Google, Apple, Facebook or Amazon and give my backend one kind of token
  • let our business customers sign in to our SaaS app through their company's SAML or OIDC identity provider
  • passwordless login for our customers with passkeys or one-time codes by email or SMS
  • hosted, branded login pages for our app that we can style without writing frontend code
  • issue JWT access tokens with custom scopes that API Gateway or our backend can verify
  • give our mobile app's users temporary AWS credentials to upload files straight to S3
  • let guests who haven't signed in reach a limited set of AWS resources from our app
  • issue OAuth client-credentials tokens to our microservices instead of long-lived API keys
  • add custom claims and scopes to access tokens at sign-in time with a Lambda function
  • run our own code during sign-up, like checking an invite list or sending a custom message
  • move users from our old auth system on their first login without forcing password resets
  • detect sign-ins with breached passwords or from unusual locations and block or challenge them
  • keep our users able to sign in if a whole AWS region goes down
  • free authentication for our first 10,000 monthly active users that doesn't expire after a year

View all 23 problems

Features

  • user pools: user directory, OIDC identity provider and OAuth 2.0 authorization server
  • identity pools: temporary AWS credentials with role-based and attribute-based access control, and guest access
  • sign-in through SAML 2.0 and OIDC providers and Google, Apple, Facebook and Amazon
  • managed login pages with a visual editor (Essentials, Plus); classic hosted UI on every plan
  • passkey sign-in with FIDO2 authenticators and passwordless one-time codes by email or SMS (Essentials, Plus)
  • MFA with authenticator apps (TOTP) and SMS on every plan; email codes on Essentials and Plus
  • Lambda triggers for custom authentication flows, messages and user migration
  • ID token customization on every plan; access token customization (Essentials, Plus)
  • machine-to-machine authorization with the client-credentials grant and resource servers
  • protection against unsafe passwords and malicious sign-ins, with exportable user activity logs (Plus)
View 10 more
  • session management, step-up authentication, token exchange and refresh token rotation (Essentials, Plus)
  • dynamic client registration for apps and AI agents (Essentials, Plus)
  • point-in-time recovery: 1 day on Essentials, 14 days on Plus
  • customer managed AWS KMS keys (Essentials, Plus)
  • multi-Region replication add-on
  • AWS WAF web ACLs on the authentication front end
  • user import from CSV files and just-in-time migration
  • user groups mapped to IAM roles
  • user pools API, AWS SDKs and the AWS CLI (cognito-idp)
  • free tier of 10,000 monthly active users on Lite and Essentials

Limitations

  • Can't be part of a PCI DSS compliant design: AWS says you can design Cognito to meet SOC 1-3, ISO 27001 and HIPAA, but not PCI DSS1
  • Doesn't give federated users MFA, custom authentication flows or threat protection: those work only for users who sign in to the user pool directly1

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what Amazon Cognito does.

  1. Logto The modern, open-source auth infrastructure for SaaS and AI apps
  2. Firebase Authentication Drop-in user sign-in for web and mobile apps from Google's Firebase
  3. Supabase The Postgres development platform
  4. Okta Customer Identity A foundational identity platform for all non-employees, ready to customize with add-ons
  5. Keycloak Open source identity and access management for modern applications and services
  6. Auth0 Hosted authentication and authorization for apps (an Okta product)

Compare Amazon Cognito with the top 3