Conceptly
← All Concepts
🔑

Amazon Cognito

SecurityUser Authentication and Authorization

Cognito is the user authentication layer for application end users. It handles sign-up, sign-in, and token issuance so the app can identify users, and it can also connect social login or temporary AWS credentials when needed.

Architecture Diagram

🔄 Process

Dashed line animations indicate the flow direction of data or requests

Why do you need it?

The moment you start building signup, login, token refresh, and password reset yourself, account security flows begin to compete with product features for time. Once social sign-in and multiple client apps join in, authentication becomes a project of its own.

Why did this approach emerge?

In the past, each app implemented its own login and token system, but this approach was prone to repeated security vulnerabilities and feature gaps. This is why managed authentication services like Cognito became important.

How does it work inside?

Cognito uses User Pools to manage user directories and token issuance, and optionally Identity Pools to map to AWS credentials. It can integrate social providers like Apple and Facebook, connect SAML or custom identity providers, and extend signup or authentication flows through Lambda triggers.

What is it often confused with?

Cognito and IAM both look like authentication, but the target is different. Cognito handles app-user login and tokens, while IAM handles people and service permissions inside an AWS account. If the problem is user signup, login, and token issuance for an app, look at Cognito; if the problem is internal AWS permissions and roles, look at IAM.

When should you use it?

Well-suited for mobile apps, web services, B2C login, user token issuance, and social login federation. Not a good fit for controlling internal permissions between AWS resources.

App user authenticationSocial loginAPI access controlTemporary AWS access