← Back to Blogs
Keycloak · AWS

Keycloak vs Amazon Cognito: the cheapest choice today, and the one you can change tomorrow

Cognito is the cheapest identity on AWS for a long time. Here's where that changes, and the decisions that matter more than the bill.

· 8 min read · Lokesh Ravichandru, CTO

If you build on AWS, Cognito is the obvious first answer for sign-in. It's managed, it's in the console you already use, and at small scale it's close to free.

The question isn't whether Cognito is good. It's what you're committing to on the day you create a user pool. Some of those choices can't be undone, and they matter more than the monthly bill.

This isn't AWS versus open source. It's something AWS runs, or something you run on AWS.

The short answer

Use CognitoNew product, under ~60,000 usersStandard sign-in, nothing to operate, and it's cheaper.
Use KeycloakRequirements still movingUser data model, tenants or sign-in methods likely to change.
Use KeycloakMulti-tenant B2B SaaSOrganizations model tenants and per-tenant SSO in one place.
Run the numbersHundreds of thousands of usersKeycloak's flat infrastructure cost starts to win.

What does Cognito cost now?

AWS changed Cognito's pricing in November 2024, and many comparison articles still quote the old model.1,2

Lite$0.0055per MAU after 10,000 free$0.0046 above 100,000. Core sign-in features.
Essentials · default$0.015per MAU after 10,000 freeManaged login, passkeys and passwordless, access-token customisation.
Plus$0.020per MAU, no free tierAdds threat protection and risk-based adaptive authentication.

Users who sign in through SAML or OIDC federation cost $0.015 each above 50 a month, on any tier. Machine-to-machine tokens have no free tier and cost $0.00225 per token request.

Monthly active usersLiteEssentialsPlus
25,000$82$225$500
50,000$220$600$1,000
100,000$495$1,350$2,000
250,000$1,185$3,600$5,000
500,000$2,335$7,350$10,000
1,000,000$4,635$14,850$20,000

Per month, AWS list prices, US East, checked 14 Nov 2026. Excludes SMS and email charges.

Where does Keycloak become cheaper?

Keycloak has no licence fee and no per-user price. Its cost follows traffic: about 15 password logins per second per vCPU, with 150% headroom for spikes.3 A highly available deployment on AWS costs about $780 a month at list price, and stays there until peak traffic passes roughly 36 logins a second.4

Monthly cost

Cognito per user vs Keycloak's flat cost

Monthly cost by monthly active users: Cognito Lite, Essentials and Plus vs Keycloak on AWSKeycloak on AWS stays at about $777 a month. Cognito Plus passes it at about 39,000 MAU, Essentials at about 62,000 and Lite at about 161,000.$0$1K$2K$3K$4K$5K050K100K150K200K250KMonthly active usersCognito PlusCognito EssentialsCognito LiteKeycloak on AWS~39K~62K~161K
Keycloak on AWSCognito PlusCognito EssentialsCognito Lite

Keycloak at peak traffic under ~36 logins/s. At 100 logins/s it's about $1,110 a month; at 300, about $2,060.

Below those points Cognito is simply cheaper. Above them, the gap has to pay for the hours your team spends running Keycloak. At a million monthly users, Cognito Essentials costs $14,850 a month; Keycloak sized for 300 logins a second costs about $2,060.

Don't pick Keycloak over Cognito to save money at 20,000 users. You won't.

Which Cognito decisions can't you undo?

This is the part most comparisons skip, and the part that drives migrations. Straight from the Cognito documentation:5

Required attributesWhich attributes are required is fixed when the user pool is created.
Custom attributesCan't be deleted or renamed, and their type and length can't change.
Sign-in identifierUsername, email or phone: the choice can't be changed after creation.
UsernamesOnce a user exists, their username is fixed.

None of this matters if your user model is settled. It matters a great deal when the business changes: an acquisition brings a second user base, a B2B customer wants to sign in by employee ID, or a regulator asks you to stop storing an attribute you once made required. On Cognito, those changes often mean a new user pool and a migration.

Cognito asks you to make your hardest identity decisions on day one, when you know least.

Which fits your situation?

Cognito is the better fit if

  • You want nothing to operate: no upgrades, patching or on-call
  • You're under the crossover and your user model won't change
  • End users need temporary AWS credentials through identity pools
  • Your team is small and every hour goes into the product

Keycloak is the better fit if

  • You run multi-tenant B2B SaaS. Organizations is fully supported since 26.06
  • Your sign-in flows need custom steps, themes or extensions
  • Some of your estate runs outside AWS
  • Many services request machine tokens, which Keycloak doesn't charge for

Cognito has also closed real gaps. Since November 2024, Essentials includes managed login with branding and passkeys, which older comparisons still list as missing.

How should you run Keycloak on AWS?

Like any other production service. Keycloak's own benchmarks were run on AWS with Aurora PostgreSQL.7

Reference layoutKeycloak on AWS: users reach an Application Load Balancer, which routes to Keycloak pods on Amazon EKS across three availability zones, backed by Aurora PostgreSQL with a writer and a standby reader Users Loadbalancer Amazon EKS · 3 availability zones Keycloakzone a Keycloakzone b Keycloakzone c Aurorawriter Aurorastandby
  1. EKS across three availability zonesSized from peak logins per second, not from user count.
  2. Aurora PostgreSQL with a standbyThe writer in one zone, a reader ready to take over in another.
  3. Upgrades on a scheduleKeycloak ships four minor releases a year, and security fixes land in the current release line.8
  4. Monitoring that mattersAlert on login latency and error rates, not just CPU.

Questions we hear

Is Cognito cheaper than Keycloak?

Up to about 62,000 monthly active users on Cognito Essentials (161,000 on Lite), yes, at list prices. Above that, Keycloak's infrastructure costs less, and the difference has to cover the time to run it.

Does Amazon Cognito support passkeys?

Yes. Since November 2024, Cognito's Essentials tier supports passwordless sign-in with passkeys, email or SMS.2

Can you change Cognito user pool attributes later?

Not the important ones. Required attributes, custom attributes and the sign-in identifier can't be changed after the user pool is created.5

Can Keycloak run on AWS?

Yes. A common production setup runs Keycloak on Amazon EKS across availability zones with Aurora PostgreSQL. Keycloak's own performance benchmarks were run on AWS with Aurora.7

Building on AWS

Choose for the decisions you might need to change, not just the bill.

Tell us about your users and tenants. One of our engineers will map the Cognito and Keycloak trade-offs for your setup.

Talk to our Keycloak team
Lokesh RavichandruCTO, Grootan Technologies. Lokesh has led enterprise Keycloak migrations and upgrades, and Keycloak and AI implementations for clients in Germany, Switzerland, Singapore and Australia.
Evidence

Sources

Every number on this page comes from a public source. Prices checked 14 Nov 2026.

  1. 1
    Amazon Web ServicesAmazon Cognito pricingLite, Essentials and Plus prices per MAU; federated users $0.015; machine-to-machine $0.00225 per token request.aws.amazon.com ↗
  2. 2
    AWS · 22 Nov 2024New feature tiers: Essentials and PlusEssentials adds managed login and passkeys; Plus adds threat protection.aws.amazon.com ↗
  3. 3
    KeycloakConcepts for sizing CPU and memory resourcesvCPU per login, refresh and machine token; 150% headroom; database sizing.keycloak.org ↗
  4. 4
    Amazon Web ServicesAWS pricing, US East (N. Virginia)EKS $0.10/h, ALB $0.0225/h plus LCUs, Aurora I/O-Optimized. Graviton c7g and Aurora r7g instance prices via price trackers.EKS ↗ · ELB ↗ · Aurora ↗ · c7g ↗ · r7g ↗
  5. 5
    AWS documentationWorking with user attributesRequired, custom and sign-in attributes can't be changed after the user pool is created.docs.aws.amazon.com ↗
  6. 6
    Keycloak · Oct 2024Keycloak 26.0 releasedOrganizations fully supported.keycloak.org ↗
  7. 7
    Keycloak · Oct 2025Keycloak 26.4 performance benchmarks500 logins/s on three pods; near-linear scaling to 12,000 requests/s.keycloak.org ↗
  8. 8
    Keycloak · Oct 2024Keycloak release updatesFour minor releases a year; a major release every two to three years.keycloak.org ↗