Amazon Cognito vs Microsoft AD FS

Amazon Cognito and Microsoft AD FS solve different login problems, so the right choice depends on who signs in and where your directory lives. This page compares capabilities, pricing structure, data control and exit, then covers when Keycloak or authentik fits better.

On this page

Amazon Cognito vs Microsoft AD FS: which fits your login

Cognito fits application login for customers on AWS, while AD FS fits federating an on-premises Active Directory to applications, and Microsoft recommends moving AD FS to Entra ID instead of upgrading it. If your trigger is a renewal, a licensing change, a residency rule or an AD FS upgrade decision, first confirm which of those two problems you actually have, because the products solve different login problems and neither is a drop-in replacement for the other. Cognito is a hosted service inside AWS with per-MAU pricing, so its cost follows your user count. AD FS is a Windows Server role, so its cost follows the server infrastructure, the licensing and the staff who patch and monitor it. Read Microsoft's AD FS overview for the current migration position, and confirm current AWS and Microsoft licensing terms with each vendor before you compare totals.

The decision turns on four questions. First, who signs in: Cognito user pools are built for customers, while AD FS is built around identities that already exist in Active Directory, which usually means employees and partners. Second, where the directory lives: AD FS authenticates against your on-premises AD, while a Cognito user pool holds its own copy of users in AWS, which matters for any residency rule that covers identity data. Third, which protocols the applications use: SAML and OpenID Connect applications move most easily, and applications on older protocols need Microsoft's Application Proxy or a partner integration path. Fourth, whether AWS-managed operation is acceptable for the system that authenticates your users, since Cognito removes server patching from your team while tying login to AWS.

Before you commit, run the checks that catch most surprises. For Cognito, list the settings that cannot change after pool creation, including required attributes, username versus alias sign-in and custom attributes, and decide your migration approach now. Since July 15, 2026, Cognito CSV imports can carry password hashes in bcrypt, scrypt, Argon2id or PBKDF2 with SHA-256, so confirm which hash types your current directory uses. For AD FS, inventory every relying party trust, because a token-signing certificate change fails sign-ins for any relying party that has not been updated. Also check farm size: a Windows Internal Database farm supports up to 30 federation servers and 100 relying party trusts, and larger farms need SQL Server. Run the AD FS Migration Readiness Script on the AD FS server to see which applications are ready to move to Entra ID.

Which option fits which scenario, and under what condition

This table matches five common scenarios to the option that fits better, along with the condition that makes it true. Read each row as a starting point, then test the condition against your directory, residency rules and application protocols. Cognito is an AWS-managed service, while AD FS runs on your own Windows servers, so the operating model matters as much as the feature set.

ScenarioBetter fit and whyCondition under which it holds
Customer sign-in to an AWS-hosted appAmazon Cognito. It is an AWS-managed service, so AWS runs the login infrastructure and no Windows servers are added.Holds when the app and its users already live in AWS and you accept per-MAU pricing.
Employee single sign-on from on-premises Active DirectoryAD FS on your Windows servers, using the AD DS domain staff already use. Cognito is AWS-managed, built for app user pools.Holds when staff sign in with AD DS accounts and you can operate AD FS on Windows servers.
Partner access from outside the networkAD FS with Web Application Proxy. It runs on your Windows servers and extends SSO to partners on the internet.Holds when you can run a separate proxy host, since AD FS runs on your Windows servers and Cognito is AWS-managed.
Data that must stay in your own data centerAD FS on your Windows servers, or self-hosted Keycloak. Cognito is AWS-managed and runs in AWS Regions.Holds when residency rules bar AWS-hosted identity data, and you can run and patch the servers yourself.
Existing AD FS farm approaching an upgrade decisionPlan a staged exit from AD FS. Microsoft recommends Entra ID over upgrading AD FS, and Cognito is AWS-managed for app sign-in only.Holds when most apps use SAML or OpenID Connect and can move in stages, while older apps stay on AD FS for now.

Amazon Cognito vs Microsoft AD FS pricing: what drives the bill

Each card covers one cost component, from the per-user meters on Amazon Cognito to the servers, licenses and operations behind AD FS, Keycloak and authentik. Use the drivers on each card to model your bill, then confirm the figures in writing with each vendor before you compare totals.

Cognito user pool tiers

Cognito user pools bill by monthly active user, and the tier you choose sets the rate. The Amazon Cognito pricing page lists Essentials at $0.015 and Plus at $0.020 per monthly active user. Lite and Essentials include 10,000 free monthly active users, Plus has no free tier, and Lite pools created before November 22, 2024 keep a free tier of 50,000. Monthly active user growth is the main driver, so model the users who sign in each month, not your total user base, and confirm which feature plan your app needs before you pick a tier.

Cognito pricing page

Cognito federated sign-ins

Users who sign in through SAML or OIDC federation are billed on a separate meter. Each account gets 50 free federated monthly active users, and after that the rate is $0.015 per monthly active user on every tier, according to the Amazon Cognito pricing page. The bill rises with the number of workforce or partner users who federate from an external identity provider. Ask AWS how federated users are counted alongside user pool users on your invoice, and list which identity providers send them before you forecast the cost.

AD FS server and licensing

Confirm with Microsoft or in your agreement whether any per-user charge applies to your AD FS use, because the cost you model sits in Windows Server licensing, hardware and operations. Microsoft lists 2 GB RAM and 32 GB disk as the minimum and 4 GB RAM and 100 GB disk as recommended for each AD FS or Web Application Proxy server. Extranet access also requires Web Application Proxy servers on separate computers, and administration time grows with each relying party trust you add. Price the servers for high availability, not just the minimum.

AD FS requirements

Keycloak infrastructure and operations

Keycloak is licensed under Apache 2.0, so the software itself carries no license fee. You pay for servers, a supported database, high availability nodes and the staff who run upgrades. Since Keycloak 26.0, the project plans four minor releases a year, so put upgrade time into your run budget. Costs rise with the number of realms, applications and peak login volume. Any paid support is a separate contract, and you should request its scope and price in writing.

Keycloak database setup

authentik edition pricing

The authentik free edition is MIT-based and offers community support only, so production teams usually compare the Enterprise edition. The authentik pricing page lists it at $5 per user per month billed annually, plus $0.02 per external user per month. Enterprise Plus starts at $20k annually and adds SLAs and FIPS compliance. Entra ID and Google Workspace integrations are Enterprise features, so confirm which ones you need before you choose a tier, because your bill grows with internal users, external users and required features.

authentik pricing

Amazon Cognito vs Microsoft AD FS side by side on capabilities

This table compares how Amazon Cognito and Microsoft AD FS handle the capabilities that usually drive a migration: protocols, external federation, MFA, user data, extranet access, claims and hosting. Read each row as a documented point or as an item to confirm in the vendor documentation for your version. The main takeaway is that AD FS is a Windows Server role you operate, and Microsoft now recommends moving off it, while Cognito is a managed AWS service with export limits you need to plan around.

CapabilityAmazon CognitoMicrosoft AD FS
Primary jobManaged customer identity for application sign-in, run as user pools in AWSFederation server role in Windows Server that gives relying party apps single sign-on
ProtocolsSAML and OIDC federation are documented; confirm the full protocol list in the Cognito developer guideToken-based single sign-on for relying parties; confirm supported protocols for your AD FS version
Federation of external identity providersUsers who sign in through SAML or OIDC federation are documented; confirm setup steps and limitsDocumented for extending SSO to partner and supplier apps; confirm brokering of other identity providers before you plan around it
MFA extensionConfirm MFA options and any custom challenge hooks in the Cognito developer guideThird-party MFA providers integrate through an extensible mechanism with no certification program
User store and migration pathListUsers returns 60 users per request with no passwords; CSV import takes password hashes since July 15, 2026Users come from AD DS; the AD FS Migration Readiness Script and Entra ID app activity report help plan exit
Extranet accessHosted endpoints, so no proxy role to install; confirm internet-facing access patterns in the Cognito documentationRequires the Web Application Proxy role service; third-party proxies must support MS-ADFSPIP; the proxy cannot share a computer with the federation server
Custom claims and tokensUp to 50 custom attributes, locked once added; sub follows a Cognito-specific formatUserInfo returns only the subject claim, so extra claims must go in custom ID tokens
Hosting model and operating footprintAWS operates the service; confirm data location and Region options in your AWS accountWindows Server role you run; servers join one AD DS domain; larger farms need SQL Server

Where Cognito and AD FS limits show up first

The Cognito limits that show up first are the ones fixed when the user pool is created. Required attributes and the choice between username and alias sign-in cannot be changed afterward, so a pool built on the wrong sign-in model must be replaced. Custom attributes follow the same logic: a user pool allows up to 50 of them, and once added, they cannot be removed or changed. Usernames also cannot change after a user is created, so any application that stores a username as a key needs a stable identifier of its own. The sub claim uses a Cognito-specific format that does not conform to RFC UUID, so check any downstream column or validator that assumes a UUID before users are imported. Before creating the pool, get written sign-off from application owners on the attribute schema and the sign-in model.

AD FS limits surface as the estate grows. A farm on the Windows Internal Database supports up to 30 federation servers and 100 relying party trusts, and larger farms need SQL Server. Count your current relying party trusts and add the applications on the roadmap, because a growing application count is usually the first trigger. WID farms lack SAML artifact resolution and token replay detection, so confirm whether any application depends on SAML artifact binding or relies on replay protection before you settle on WID. Every server must join the same AD DS domain, which turns a new domain into a redesign. A federation server and Web Application Proxy also cannot share a computer, so each extranet publishing design adds servers to the count. Check the AD FS requirements before sizing hardware or the farm.

Each limit matters at a different moment. A growing application count reaches the WID ceiling in AD FS first, and a new domain forces the single-domain rule across the whole farm. A multi-region design adds server placement and extranet questions that need a written answer for each region. A planned change of user model, such as moving customers from one sign-in model to another, is the Cognito equivalent because it forces a new pool. When any of these changes is on the roadmap, ask the team to list every trust or app client, its protocol, and its token or sub dependency. The AD FS token-signing certificate also matters: if it changes, every relying party must receive the new certificate or its sign-ins fail. Microsoft highly recommends migrating to Entra ID, so a farm near these limits also raises a platform decision.

Data location, export and exit: what leaving Cognito or AD FS involves

Leaving Cognito or AD FS depends less on copying users than on where identity data sits, what can be exported, and which settings keep applications signing in. The four cards cover these points in turn. Ask your vendor or partner to answer each one in writing before you agree on a scope.

Where identity data sits

A Cognito user pool is hosted in AWS, so confirm the Region it sits in and who controls the AWS account that owns it. AD FS servers run on your own Windows infrastructure and must all join the same AD DS domain. Microsoft lists 2 GB RAM and 32 GB disk as the minimum and 4 GB RAM and 100 GB disk as recommended for each AD FS or Web Application Proxy server, so confirm who patches those hosts and where the domain controllers sit.

AD FS requirements

Export paths and password hashes

ListUsers returns up to 60 users per request with attributes, the enabled flag, status, MFA options and timestamps, but no password field. Plan for forced password resets or a sign-in-time migration when you leave Cognito, since no hashes come out with the export. Moving into Cognito is different: CSV imports accept bcrypt, scrypt, Argon2id or PBKDF2 with SHA-256 hashes since July 15, 2026, verified at first sign-in. AD FS exits run app by app, because the accounts stay in AD DS while each relying party moves.

Lock-in points on both sides

Cognito fixes required attributes, username versus alias sign-in and custom attributes at pool creation, and its sub identifier uses a Cognito-specific format that does not conform to RFC UUID. Applications that store sub stay tied to the pool. AD FS ties each application to a relying party trust, and when the token-signing certificate changes, every relying party must receive the new certificate or its sign-ins fail. Ask which of these bindings your applications depend on today.

Application re-pointing effort

Each application must accept a new issuer and new claims before sign-in works again, and this work is usually the largest part of an exit. The AD FS UserInfo endpoint returns only the subject claim, so any extra claims must be issued in custom ID tokens. Ask your partner in writing for an application inventory with protocol and claim mapping, a per-application cutover plan, the certificate rollover steps, and the named owner who tests each sign-in path.

Migration stages

How to choose the path: a decision diagram

The diagram starts with who signs in, then checks whether identity must stay inside your own infrastructure. If it must, self-hosted Keycloak or authentik is the first branch to evaluate. Customers on AWS go to Amazon Cognito, where the key hand-off is how existing users move in: a migration trigger at first sign-in or a bulk CSV import. Employees with on-premises Active Directory split by protocol. Applications on SAML or OpenID Connect go to a Microsoft Entra ID migration plan or a self-hosted federation option. Applications on older protocols go through Application Proxy or a partner integration. Before choosing a branch, confirm each application's protocol and review the output of the AD FS readiness script.

Decision path from who signs in to the migration branch that fits.

When Keycloak or authentik fits better, and what running it involves

Choose Keycloak when you need a self-hosted server that speaks OpenID Connect, OAuth 2.0 and SAML 2.0 and can read users from a directory you already run. Keycloak is licensed under Apache 2.0 and is a Cloud Native Computing Foundation incubating project. Its built-in user federation connects to existing LDAP and Active Directory servers, so you can keep the directory in place while applications move off AD FS. The current release is 26.8.1, published October 13, 2026. Since Keycloak 26.0, the project has planned four minor releases a year, and it says breaking changes in a minor release will be opt-in, which gives your team a predictable upgrade rhythm. Confirm the release you deploy and its upgrade notes before you fix a version in your change calendar.

Consider authentik when you want one identity provider that also covers LDAP, RADIUS and Kerberos, and when your organization can accept a split license model. The core is MIT licensed, but the enterprise directory under authentik/enterprise/ falls under a separate enterprise license, so have counsel read both before you build on it. The free edition supports OIDC, SAML, LDAP, SCIM, RADIUS, Kerberos and proxy authentication, with community support only. Microsoft Entra ID integration is Enterprise-only, so if your AD FS estate is heading to Entra ID, add that integration to your cost line. The authentik pricing page lists Enterprise at $5 per user per month billed annually plus $0.02 per external user per month, with ticket-based support for subscriptions over $1k. Get the support terms in writing before you rely on them in production.

Running either platform means owning the database, high availability, certificates and SAML metadata, MFA, backups, patching and on-call. Keycloak's database configuration guide sets out what the database layer needs, so settle the database and cluster design before go-live. Signing certificates matter as much as they did in AD FS: when the AD FS token-signing certificate changes, every relying party must receive the new certificate or sign-ins fail, so build metadata refresh into each application's change procedure. Keycloak's realm export and import uses kc.sh export and kc.sh import with JSON files, but the docs warn that this is limited as a backup and that all nodes must be stopped while it runs. Keep database backups as the recovery copy, use exports for portability, and test a restore before you depend on it. Choose FreeIPA instead when your Linux estate needs integrated identity and the directory must form mutual trusts with Microsoft Active Directory. Self-hosting fits when the organization must keep identity in its own infrastructure and can operate it.

What a move from AD FS or Cognito involves, step by step

This sequence moves each application from AD FS or Amazon Cognito to a new identity provider in controlled batches, and keeps the old path running until each relying party is confirmed working. Every step ends with a check the security team can review before the next step starts. The output is a retired legacy path and written evidence of which applications moved, when, and how they were tested.

  1. Inventory applications and protocols

    Build a complete list of every relying party (AD FS) or app client (Cognito), with its protocol, its owner and the users who depend on it. For AD FS, run the AD FS Migration Readiness Script on the AD FS server and review the AD FS application activity report in Entra ID to see which applications still authenticate. For Cognito, use the ListUsers API to capture profiles, status and MFA options, which returns at most 60 users per request, and record each app client and Lambda trigger. The output is one inventory that each application owner has checked.

  2. Sort applications into migration waves

    Split the inventory into waves. Applications on modern protocols such as SAML and OpenID Connect move first, following Microsoft's migration guidance on AD FS. Older AD FS applications go through Application Proxy or a Secure Hybrid Access partner instead, and Cognito applications are grouped by the triggers and login flows they depend on. Each application gets a wave number, an owner and a decision to move, keep or retire. The output is a wave plan the security team has reviewed.

  3. Choose a Cognito user migration method

    If the destination is a Cognito user pool, choose how users enter it. A user migration Lambda trigger migrates each user at first sign-in with their existing password, which needs a verification path to the source directory that you confirm with your identity team. A CSV import carries profile attributes and, since July 15, 2026, can carry password hashes in bcrypt, scrypt, Argon2id or PBKDF2 with SHA-256 that Cognito verifies at first sign-in. Where no password source is available, forced password resets are the fallback, because ListUsers responses carry no password field. The output is a written choice per user group, tested with a pilot account.

  4. Build and test a parallel environment

    Stand up the new issuer beside the current AD FS or Cognito path, in a non-production environment with the same applications and test accounts. Confirm the issuer URL, signing keys and the claims each application reads, including the subject identifier. Where Cognito issues sub values in its own format, check that no application assumes RFC UUIDs, and where AD FS is the source, remember that its UserInfo endpoint returns only the subject claim, so extra claims belong in ID tokens. The output is a per-application test report covering sign-in, claims, sign-out and token refresh.

  5. Cut over relying parties in batches

    Move one wave at a time, starting with the lowest-risk applications, and point each relying party at the new issuer. Plan any AD FS token-signing certificate change as a separate, scheduled action: every relying party must receive the new certificate or its sign-ins fail, so no relying party is left behind on the old one. Keep the old path live until each batch passes its production sign-in checks. The output is a cutover record per batch, listing the change window, rollback step and security team sign-off.

  6. Retire the old path with written evidence

    Once every wave is cut over and the logs show no remaining sign-ins on the old path, disable the AD FS relying party trusts or Cognito app clients and remove the old path from production. Archive configurations, the wave records and the user exports under your retention rules, and confirm with your compliance team which evidence an auditor will ask for. For AD FS, record the reasons for the move, including Microsoft's recommendation to migrate to Entra ID. The output is a closure report with dated evidence that the old path is retired.

Questions buyers ask before choosing or moving

What drives the cost and effort of moving off AD FS?

Four inputs drive most of the cost and effort: the number of applications, the protocol mix, the user count, and the high availability you need during the move. Count applications first, because each one needs its own relying party or app client, mapped claims and tested sign-in. The protocol mix matters because SAML and OpenID Connect applications are usually simpler to move, while applications on older protocols may need a proxy or partner path. User count affects the Cognito bill and the data work. High availability adds redundant components and failover testing on whichever side stays live during cutover. The migration method also matters: moving users at sign-in spreads support work across normal logins, while forced password resets concentrate it into a single window. Ask the provider to state each driver as a count in the written scope.

Is Amazon Cognito cheaper than Microsoft AD FS to run?

It depends on your own counts, so run the numbers with them before deciding. Cognito bills per monthly active user, and AWS's pricing page lists Essentials at $0.015 and Plus at $0.020 per MAU. Users who sign in through SAML or OIDC federation get 50 free MAUs per month per account, then $0.015 per MAU on every tier. Lite and Essentials include 10,000 free MAUs per month, though older Lite pools may have a larger free tier. AD FS is not metered by user, but its costs sit elsewhere: servers or VMs for the farm, separate Web Application Proxy servers for extranet access, SQL Server for farms beyond the Windows Internal Database limits, Windows Server licensing, and staff time for patching and certificates. Confirm Windows Server licensing terms against your own agreement with Microsoft. Ask for each cost component as its own line in any quote.

How long does it take to move from AD FS to Cognito?

The timeline depends on your application inventory, and no honest duration can be given before that inventory exists. The number of relying parties, their protocols, any custom claim logic, which applications need extranet access, and how quickly application owners can test all drive the schedule. Microsoft's AD FS decommission reference describes a readiness script that runs on the AD FS server and an application activity report in Entra ID, which can help build that inventory. Ask for a written scope and timeline built from your inventory, listing the phases, the cutover approach and the acceptance tests. Under DeployOpen's fixed-scope model, scope, deliverables and timelines are agreed in writing before work starts. Also ask what happens to the timeline if the inventory changes during the project.

What does our team need to provide for an AD FS move?

The work needs four things from your side, and they set the pace more than the tooling does:

  • An inventory of every relying party, with its protocol, login flow, claims and owner.
  • Named application owners who can confirm expected behavior and sign off on tests.
  • A test environment that mirrors production sign-in, including test Cognito resources and test AD FS relying parties.
  • Change windows agreed with operations for cutover and rollback.

Also provide access to the AWS account, the AD FS farm and the directory that holds your user data. Check that your change process allows phased cutovers, because when the AD FS token-signing certificate changes, every relying party must be updated with the new certificate or its sign-ins fail.

Can our own team migrate from AD FS without outside help?

Yes, a move is feasible in-house for a small estate where the team already has SAML and OpenID Connect experience. Larger estates, many protocols or unfamiliar identity code usually justify outside help. Plan for what stays with your team either way: certificates, including the AD FS token-signing certificate and the certificates each relying party trusts, databases if your farm runs on SQL Server, and upgrades to Windows Server and AD FS until decommission. AWS operates Cognito, so you will not patch identity servers for it, but you still own user pool configuration, app clients, Lambda triggers and the sign-in test suite. If you hire help, ask for fixed-scope work with written deliverables, and ask who runs the system after cutover.

Can AD FS stay running while we adopt Cognito?

Yes, if each application has a federation path you can confirm in your own environment. Check, application by application, whether it signs in with SAML or OpenID Connect and whether it can use the federation path you plan to use with Cognito. Microsoft's migration guidance says to move applications that use modern protocols such as SAML and OpenID Connect first, while applications on older protocols are integrated through Application Proxy or Secure Hybrid Access partners. Running both creates two sign-in paths, so test login, logout and claims on each path, and record which users reach which path. Keep AD FS token-signing certificate changes in the plan, because each relying party must be updated when the certificate changes. Confirm every pairing before cutover.

How DeployOpen helps you choose and move

DeployOpen starts by writing down which Cognito user pool settings, AD FS relying parties and sign-in flows your applications depend on, then compares self-hosted options against them. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. The written scope can include a comparison and a migration plan that your security and compliance teams review before any change reaches production.

How we scope

  • Inventory the Cognito user pools, app clients, Lambda triggers and sign-in flows that depend on the current setup.
  • Record which settings are fixed at pool creation and which AD FS relying party trusts and claim rules must move.
  • Agree the written scope, deliverables and timelines with you before any work starts; ongoing support is available as a retainer.

How we build

  • Deploy the chosen self-hosted platform in your own cloud accounts, data centers or air-gapped network, with SSO and audit logging.
  • Connect directories and federation sources such as Active Directory, and test each sign-in path before cutover.
  • Verify token claims and subject identifiers so applications that depend on them keep working after cutover.

How we hand over

  • Document the realm or tenant layout, client settings and identity source mappings your team will operate.
  • Provide the evidence your compliance and security teams need to review the setup, without issuing any audit or attestation.
  • Hand over runbooks for backup, restore and retirement steps for the old setup, as agreed in the written scope.

How we support

  • Keep the platform patched and upgraded under a retainer, with the upgrade path agreed in advance.
  • Run continuous security testing and retest findings on the identity setup, including MFA and admin settings.
  • Ask for the support and upgrade terms in writing before the scope is signed.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.