AWS · Security, Identity, and Compliance

Amazon Cognito

Sign-up, sign-in and access control for your web and mobile app users, including social and enterprise identity providers.

On the SAA-C03 exam listIdentity and accessServerless

What it is and what problem it solves

Amazon Cognito handles your application's end users. A user pool is a user directory with sign-up, sign-in, MFA, password policies, hosted login pages, and federation with social providers (Google, Apple, Facebook, Amazon) and enterprise providers (SAML, OIDC). It issues standard JSON Web Tokens that your APIs can verify.

An identity pool exchanges a token (from a user pool or another provider, or none for guests) for temporary AWS credentials, so a mobile app can call S3 or DynamoDB directly with permissions scoped to that user.

When to use it

  • A web or mobile app needs user accounts without building authentication yourself.
  • You want social or enterprise login for your app's users.
  • API Gateway or an ALB should authenticate users before your code runs.
  • Mobile clients need scoped, temporary AWS credentials.

When to avoid it

  • Your own employees reaching AWS accounts: use IAM Identity Center.
  • Machine-to-machine access between your AWS workloads: use IAM roles.
  • Very custom identity flows that a managed user directory cannot model; a specialist identity platform may fit better.

Scaling model and bottlenecks

User pools scale to very large numbers of users; request rate quotas apply per API category and can be raised (for a fee above defaults).

Limits and quotas

ItemValueContextSource
Users per user pool 40,000,000
Can be raised with a quota request
Higher numbers through your account team. Source
checked
User pools per Region 1,000
Can be raised with a quota request
The maximum quota is 10,000. Source
checked
App clients per user pool 1,000
Can be raised with a quota request
Source
checked
Identity pools per account 1,000
Can be raised with a quota request
Source
checked

Quotas and limits change. Check the linked source before designing around a number.

Cost model

What you pay for

  • Monthly active users (MAU) in user pools, by feature tier (Lite, Essentials, Plus), with different rates for federated (SAML or OIDC) users.
  • Machine-to-machine token requests, advanced security features on some tiers, and raised API quotas.
  • SMS (through SNS) and email (through SES) for verification and MFA are billed separately; identity pools have no charge.
  • A monthly free allowance of active users applies to the Lite and Essentials tiers.

Where it is cost-efficient

Apps with many registered but infrequently active users, since you pay for monthly active users.

Where costs grow

SMS-based MFA and verification at scale, many federated users, and higher feature tiers.

Cost controls and common surprises

Prefer TOTP or email for MFA where acceptable, choose the lowest tier that has the features you need, and watch MAU counts.

Prices differ by Region and change over time; see the pricing page linked under Sources.

Security

Controls the service provides

Password policies, MFA, account recovery, token signing and expiry, compromised-credential checks and adaptive authentication in higher tiers, and integration with AWS WAF.

What you configure

Require MFA where appropriate, keep token lifetimes short, verify tokens properly in your API, scope identity-pool roles to each user's own data, and protect sign-up from abuse.

Logging and monitoring

CloudTrail for API calls; user activity and risk events in higher tiers.

Related security services

API Gateway and ALB authorisers, AWS WAF, IAM (identity-pool roles), SES and SNS.

Shared responsibility

AWS runs the identity service. You configure policies, flows and the permissions granted to signed-in users.

Availability, backup and failure behavior

Cognito is a regional, managed service. User pools live in one Region; plan for that Region in disaster recovery, and test how your app behaves if sign-in is briefly unavailable.

Common service combinations

API Gateway (Cognito authoriser or JWT authoriser), ALB authentication, Amplify front ends, AppSync, identity pools with S3 and DynamoDB.

Business application examples

  • A mobile game with Apple and Google sign-in and per-player saved data in DynamoDB.
  • A B2B web app where each customer signs in through their own SAML identity provider.

Exam cues and common confusions

  • User sign-up and sign-in for an app: Cognito user pools.
  • Temporary AWS credentials for app users, including guests: Cognito identity pools.
  • Employees and AWS accounts: IAM Identity Center.
  • Protect an API with user tokens: API Gateway with a Cognito authoriser.

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake