Arkinu
AWS service comparison

Amazon Cognito vs AWS Directory Service: differences and when to use each

Amazon Cognito
AWS Directory Service

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Security, Identity, and Compliance

Amazon Cognito

On the radar· Amazon Cognito Sync no longer accepts new customers

Identity platform for web and mobile applications: user pools sign up and authenticate users (including through Google, Apple, or SAML and OIDC providers) and issue JWTs. Identity pools exchange those tokens for temporary AWS credentials to access services such as Amazon S3 or Amazon DynamoDB.

Exam phrases that point here

  • «user sign-up and sign-in for a web or mobile application»

    An Amazon Cognito user pool is a managed user directory: it handles sign-up, sign-in, email or phone verification, and MFA.

    When not: If the people signing in are employees accessing AWS accounts, the clue points to IAM Identity Center. Cognito is for an application's customers or end users.

  • «sign in with Google, Facebook, or Apple»

    Cognito supports social providers and SAML or OpenID Connect providers, so the application does not have to integrate each one on its own.

    When not: If sign-in with an IdP is for employees to access the AWS Management Console, the answer is IAM Identity Center or IAM federation, not Cognito.

  • «give mobile app users direct, temporary access to S3 or DynamoDB»

    An identity pool exchanges the user's identity (from a user pool, a social provider, or a guest) for temporary AWS credentials tied to an IAM role.

    When not: If the application only calls its own API and does not touch AWS services directly, the user pool token and an API Gateway authorizer are enough, with no identity pool.

  • «allow guest access without signing in»

    Identity pools can give credentials to unauthenticated users, with a different, more limited IAM role than the one for authenticated users.

    When not: Guest access is for using AWS resources from the app. If the goal is to serve public content, such as images or pages, Amazon S3 and Amazon CloudFront are usually enough.

  • «protect an API Gateway API so that only registered users can call it»

    API Gateway has a Cognito user pool authorizer: it checks the token the client sends and lets through only calls with a valid token.

    When not: If the caller is another AWS service or an application with IAM credentials, IAM authorization is used. If you need custom logic to validate a token from another provider, a Lambda authorizer is used.

Often paired with

  • Amazon API Gateway
  • Amazon DynamoDB
  • Amazon S3
Study Amazon Cognito →

Security, Identity, and Compliance

AWS Directory Service

On the radar· Simple AD no longer accepts new customers

Provides several ways to use Microsoft Active Directory on AWS: an actual AD managed by AWS (AWS Managed Microsoft AD), a proxy to your on-premises AD (AD Connector), or a basic compatible directory (Simple AD), which has not accepted new customers since July 30, 2026. It lets Windows applications and workloads on AWS use the users and groups in a directory.

Exam phrases that point here

  • «workloads that depend on Microsoft Active Directory on AWS»

    AWS Managed Microsoft AD is a real Active Directory managed by AWS inside your VPC: Windows applications, SQL Server, or FSx for Windows File Server can join it without you building domain controllers.

    When not: If all that is needed is for employees to access AWS accounts or SaaS applications, the clue points to IAM Identity Center. If the users are customers of an application, to Amazon Cognito.

  • «use on-premises Active Directory credentials without replicating the directory in the cloud»

    AD Connector is a gateway that redirects authentication requests to the on-premises AD and does not store directory information in the cloud.

    When not: If applications must keep working even if the connection to on-premises is cut, or if the directory must be shared with other accounts, AWS Managed Microsoft AD (with a trust relationship if needed) is a better fit.

  • «trust relationship with the existing Active Directory domain»

    AWS Managed Microsoft AD supports forest and external trust relationships, one-way or two-way, with an on-premises AD.

    When not: AD Connector does not support transitive Active Directory trusts: it only forwards requests, and you need one per domain. If the scenario requires a trust between domains, AD Connector is not the answer.

  • «highly available managed Active Directory without managing the domain controllers»

    AWS Managed Microsoft AD is deployed by default across two Availability Zones, and AWS takes care of daily backups, patching, and replacing domain controllers that fail.

    When not: If you need full control of the domain controllers' operating system (for example, RDP access), you would have to install AD on your own EC2 instances.

  • «automatically join EC2 instances to the domain when they launch»

    With seamless domain join, a Windows or Linux instance joins a Directory Service directory when launched from the console.

    When not: Domain join is only one piece: if the scenario is about managing the fleet of instances (patching, commands), think of AWS Systems Manager.

Often paired with

  • Amazon EC2
  • Amazon RDS
  • AWS IAM Identity Center
Study AWS Directory Service →