Service comparisons / User pools vs Identity pools

Cognito user pools vs identity pools

An Amazon Cognito user pool signs users in and issues JWTs; an identity pool exchanges a sign-in for temporary AWS credentials. What each does and when an app needs one or both.

Last checked against AWS documentation · How we write our content

QuestionUser poolsIdentity pools
JobAuthentication, proving who the user isAuthorization to AWS, giving the user AWS credentials
Gives the appID, access and refresh tokens (JWTs)Temporary AWS credentials from STS, limited by an IAM role
Users come fromIts own directory, or social and SAML/OIDC identity providersA user pool, social providers, SAML or OIDC providers, or guest (unauthenticated) access
Use it toSign users up and in, add MFA, protect APIs with a JWT authorizerLet the app call S3, DynamoDB or other AWS services directly
ExtrasHosted sign-in pages, Lambda triggers, threat protectionDifferent IAM roles per group or per attribute

Cognito has two parts with confusingly similar names. A user pool is a user directory that handles sign-in. An identity pool is a credentials broker that turns an identity into short-lived AWS permissions.

How to choose

Exam traps