Amazon Cognito
- User Pools — sign-in for web/mobile apps. Username/password, social sign-in (Google, Facebook), SAML. Integrates with API Gateway and ALB.
- Identity Pools (Federated Identities) — provide temporary AWS credentials so users can directly access AWS resources (S3, DynamoDB). Exchange Cognito User Pool token for AWS credentials.
Rule of thumb: "hundreds of users", "mobile users", "authenticate with SAML" → Cognito (not IAM).
