Amazon Cognito
Cloud service · AWS · Updated

Amazon Cognito

In short

Amazon Cognito is a cloud service provided by Amazon Web Services (AWS) that provides authentication, authorization, and user management for web and mobile applications.

Cloud Services Hub →

Free Amazon Cognito tools

6 key features of Amazon Cognito

Amazon Cognito offers secure user authentication, is easily scalable, ensures compliance, provides customizable user experiences, and supports data synchronization across devices.

01
User Authentication

Amazon Cognito provides user authentication with social identity providers like Google, Facebook, and Amazon, as well as with user pools for direct sign-in functionality.

02
Security and Compliance

It ensures data security and compliance by offering features such as encryption at rest and in transit, MFA (Multi-Factor Authentication), and compliance with various certifications and regulations.

03
Customizable User Experience

Enables customization of the user experience with UI customization, messages customization, and user pool domains to maintain consistent branding across your applications.

04
Serverless and Scalable

Designed to be serverless and scalable, it automatically scales to handle millions of users without requiring any infrastructure management.

05
Data Synchronization

Offers data synchronization across devices and platforms, allowing a seamless user experience and access management for your applications.

06
Anonymous Guest Access

Identity pools support anonymous guest users, allowing applications to grant access to AWS services without requiring users to sign in.

Where Amazon Cognito is used

Amazon Cognito is used for secure user authentication and authorization, federated identity management, direct AWS resource access, multi-factor authentication, and creating custom authentication flows for web and mobile applications.

  1. 01
    User Authentication and Authorization

    Amazon Cognito facilitates secure user sign-up, sign-in, and access control to web and mobile applications, eliminating the need for backend code to authenticate users and manage user-specific tokens.

  2. 02
    Federated Identities

    Cognito supports identity federation that allows users to sign in through social identity providers such as Google, Facebook, and Amazon, as well as enterprise identity providers via SAML 2.0, thus simplifying the login process and enhancing user experience.

  3. 03
    Secure Access to AWS Services

    With Cognito, developers can assign user-specific permissions to access AWS resources directly from the front-end application, ensuring a fine-grained access control mechanism.

  4. 04
    Multi-factor Authentication

    It provides additional security by enabling multi-factor authentication (MFA), which requires users to verify their identity through multiple methods before being granted access.

  5. 05
    Custom Authentication Flows

    Amazon Cognito allows for the creation of custom authentication workflows using AWS Lambda triggers, enabling unique authentication processes tailored to specific business requirements.

How Amazon Cognito is priced

Amazon Cognito's pricing is primarily based on the number of Monthly Active Users (MAUs), with the first 50,000 being free, and includes additional costs for federation and using custom authentication flows with AWS Lambda.

Monthly Active Users (MAUs)

Amazon Cognito user pools are billed by monthly active users. The standard free tier for direct or social sign-in is 10,000 MAUs per month per account or AWS organization for Lite and Essentials; Plus has no such free tier. Free-tier pricing is unavailable in AWS GovCloud (US).

Federation

Users signing in through SAML or OIDC federation have separate MAU pricing: the first 50 MAUs are free, and additional MAUs cost $0.015 each. Social identity provider sign-ins are included with direct user-pool sign-ins rather than this enterprise federation rate.

Custom Authentication Flows

Using AWS Lambda triggers for custom authentication flows may incur additional costs. These costs are associated with the use of AWS Lambda, which Cognito uses to execute custom scripts for authentication, verification, and other custom processes.

Advanced Security Features

Enabling Advanced Security Features incurs additional MAU charges on top of base user-pool pricing, including when operating in audit mode.

SMS Messages

SMS messages for MFA, registration, password recovery, and phone-number verification are charged separately through Amazon SNS.

Email Messages

Email messages for registration, password recovery, and email-address verification are charged separately through Amazon SES.

Cognito Sync

Cognito Sync charges for stored data and synchronization operations. Eligible customers receive 10 GB of cloud sync storage and 1,000,000 sync operations per month for the first 12 months.

Higher API Quotas

Additional API capacity is charged per incremental request per second above default quotas, with each API category billed separately.

Machine-to-Machine Authorization

M2M authorization is billed monthly per successful token response, with no additional charge for registered app clients.

Multi-Region Replication

Multi-Region replication adds charges to base tier pricing per MAU or successful token request. Each unique user is counted once globally across the primary and secondary Regions.

Services Amazon Cognito works with

Amazon API GatewayAmazon API Gateway

Cognito can be used to secure RESTful APIs created with API Gateway. It provides user authentication and authorization, allowing only authenticated and authorized users to access API endpoints.

AWS LambdaAWS Lambda

Lambda functions can be triggered by events in Cognito, such as user sign-up, sign-in, and attribute updates. This allows for custom authentication workflows, data processing, and other event-driven actions.

Amazon S3Amazon S3

Cognito integrates with S3 to provide secure access to S3 buckets. You can use Cognito to manage permissions and provide users with temporary credentials to access S3 resources.

Amazon DynamoDBAmazon DynamoDB

Cognito can be used with DynamoDB to store user profile data and application state. This allows for seamless integration of user data management with your application backend.

AWS Identity and Access Management (IAM)AWS Identity and Access Management (IAM)

Cognito integrates with IAM to provide fine-grained access control to AWS resources. It allows you to define roles and policies that dictate what resources users can access based on their authentication and authorization status.

Amazon CloudWatchAmazon CloudWatch

Cognito integrates with CloudWatch for monitoring and logging. You can track metrics related to user authentication, authorization, and usage, and set up alarms for specific events.

Amazon RDSAmazon RDS

Cognito can integrate with RDS for storing and managing relational user data. This can be used for applications requiring complex queries and transactions on user data.

Amazon Augmented AI (Amazon A2I)Amazon Augmented AI (Amazon A2I)

Amazon Cognito authenticates members of private workforces used for Amazon A2I human review. Reviewers sign in to the worker portal with accounts in the workforce's Cognito user pool.

Amazon Bedrock AgentCore

Amazon Cognito user pools can issue access tokens for AgentCore endpoints configured with JWT authentication. AgentCore validates the tokens against the configured Cognito issuer and client settings before allowing access.

Amazon CloudFrontAmazon CloudFront

Amazon Cognito provisions a CloudFront distribution when you configure a custom domain for user-pool managed login. The distribution serves the sign-in endpoints over HTTPS using the certificate associated with that custom domain.

What is Amazon Cognito

3 min read

Amazon Cognito is a sophisticated service offered by Amazon Web Services (AWS) that provides authentication, authorization, and user management for web and mobile applications. The service is designed to be highly scalable, secure, and flexible, thus enabling developers to add user sign-up, sign-in, and access control to their applications quickly and easily, without worrying about the back-end infrastructure and security mechanisms typically associated with these features. 

At its core, Amazon Cognito allows applications to authenticate users through various methods including social identity providers such as Google, Facebook, and Amazon, as well as through enterprise identity providers via SAML 2.0. Moreover, it provides its own secure and scalable user directory that can scale to hundreds of millions of users. This is particularly appealing for developers looking to manage user identities and federations without having to maintain a separate backend system for this purpose. 

For machine-to-machine authorization, app clients use the OAuth 2.0 client credentials flow to exchange credentials for access tokens that they can use to communicate with services. Access-token validity can be configured per service.

API request-rate quotas apply per AWS account and Region and are shared across user pools in that Region. A quota increase in one Region does not increase the request rate available in another Region.

When configuring a user pool, you can choose Lite, Essentials, or Plus. Lite provides basic registration, authentication, and user management. Essentials adds Managed Login, passwordless sign-in with passkeys or email and SMS one-time passwords, access-token customization, and password-reuse prevention. Plus adds threat protection, including risk-based adaptive authentication, compromised-credential detection, and authentication-event log export. Essentials is the default for new user pools, and pools can switch tiers.

One of the standout features of Amazon Cognito is its ability to offer seamless authentication and authorization across multiple devices and platforms. A signed-in session is not automatically transferred from one device to another; a new device generally requires authentication unless the application implements a secure session-transfer mechanism. This is facilitated through the use of tokens which are securely managed by Cognito. Data synchronization is another noteworthy feature of Amazon Cognito. It allows user data such as app preferences or game states to be synchronized across various devices, enabling a consistent user experience regardless of the platform being used. This data is stored in the AWS Cloud, which ensures its availability and scalability. 

Amazon Cognito also places a strong emphasis on security. It encrypts data at rest and in transit, and operates in Amazon highly secure data centers. It allows for multi-factor authentication (MFA) and the use of strong password policies to enhance security further. The service is compliant with various industry standards, including ISO/IEC 27001, ensuring that applications using Cognito adhere to strict data protection regulations. 

Multi-Region replication can synchronize user data, credentials, and user-pool configurations to additional AWS Regions for regional failover while preserving active sessions. It requires a multi-Region customer managed AWS KMS key and, where applicable, a multi-Region OIDC issuer configuration; regional failover is configured to meet your operational requirements.

In terms of integration, Amazon Cognito provides APIs and SDKs for a wide range of platforms including Android, iOS, and the web, making it a versatile option for developers across various environments. This ease of integration, coupled with its comprehensive feature set, makes Amazon Cognito a powerful solution for managing user identities and ensuring secure and seamless access to web and mobile applications. 

In essence, Amazon Cognito relieves developers of the complexity associated with creating, maintaining, and securing a system for user management and authentication, allowing them to focus on developing the core features of their applications. Its scalability ensures that the solution remains viable as the application user base grows, which is a critical consideration for any online platform looking to expand its reach.

Concepts related to Amazon Cognito

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.