Migrate from Amazon Cognito to Keycloak
Move your Cognito user pools to upstream Keycloak on a dedicated cluster, on AWS or Azure. Users, standard and custom attributes and groups come along; passwords are set again by email link, because Cognito does not export them.
Vendor facts checked on · Sources
Users and their attributes move from list-users, and groups from the per-user group lists. App clients, the hosted UI and identity providers are re-created as Keycloak clients and identity providers, and Lambda triggers are rewritten or retired. Password users set a new password by email link. You test everything on a staging copy first.
What moves from Amazon Cognito, and what does not
Re-created means we build it again in your realm from your inventory; it does not come out of an export.
Passwords are set again by email link
Cognito does not give out passwords or hashes. The list-users response has no password field, and AWS’s own guidance for exporting user profiles says it does not export sensitive information such as passwords.
Cognito users who sign in with a password set a new one after the move. We import them with Keycloak’s Update Password required action, and Keycloak emails each of them a link to set a new password (the execute-actions email). The link opens Keycloak’s own page and works for as long as you choose.
Users who sign in with Google, Microsoft or another identity provider do not need a password. Once the same provider is set up in your realm, their first sign-in finds their account by email and asks them to confirm the link.
The export
- List users with aws cognito-idp list-users.
- List each user’s groups with admin-list-groups-for-user, or each group’s users.
- List app clients, identity providers, resource servers and Lambda triggers.
Treat the export as a secret: keep it encrypted, never send it by email or chat, and delete every copy when the move is done.
Moving from Amazon Cognito, step by step
- 1
Export
List users with the AWS CLI and collect group memberships. Write down every app client with its callback URLs and scopes, every identity provider and every Lambda trigger.
- 2
Map
Convert the users with the Cognito converter: attributes, the sub as cognito_sub, groups, and Update Password for every password user. Re-create app clients as Keycloak clients, and replace claims added by a pre token generation trigger with mappers.
- 3
Dry run on a staging copy
Import into a staging realm. Sign in through each app, check that your backend finds users by cognito_sub or their new id, and finish a set-password email yourself.
- 4
Tell your users
Announce the date and the new password by email link, and that authenticator apps are set up again.
- 5
Cut over
Stop sign-ups in Cognito, export again, import, switch the apps to the new issuer, and send the set-password emails in batches.
- 6
Keep a way back
Keep the user pool unchanged until you sign the move off, and write down how each app switches back.
It depends, and on what
We do not give a length without seeing what you run. These are the things that set it.
- How many Lambda triggers run, and what each one does
- Whether your backend keys data on the Cognito sub, and how it will find users after the move
- Whether users rely on SMS codes, which Keycloak does not offer out of the box
- How many applications sign users in, and how many redirect URIs and token claims each needs
- How many social and enterprise identity providers you use, and how quickly each approves a new redirect URI
- How much notice your users need before the switch
- How many people on your side test the dry run, and when
What each plan includes for a move
Support is in writing, through the dashboard and the contact form. There are no calls and no demos.
You move, with our tools and guides
We- Your cluster, ready before you import
- Free converters, a readiness checklist and email templates
- A guide for your source in the docs
- Answers in writing, first response the next business day
- Export from your current system
- Convert and import into a second realm as a dry run (Starter has two)
- Write to your users and switch your apps
We do the move with you, in the plan’s service hours
We- Plan the move with you from your inventory
- Convert users and re-create clients and identity providers
- Import into a staging copy and fix what the dry run finds
- Import into your cluster at cut-over and watch the first hours
- Uses the plan’s 10 service hours a month
- Export from your current system and hand it over encrypted
- Test the dry run with your own apps
- Send the emails to your users and switch your apps
Very large moves, scoped with you
We- Many realms, very many users, or a long period with both systems running
- Scope, sizing and price agreed in writing
- Tell us what you run through the contact form
Prices and the service hours each plan includes are on the pricing page. A move larger than the plan’s hours is scoped with you as Custom.
Tools for this move
They run in your browser; nothing you paste is sent to us. The Amazon Cognito guide in the docs has the commands.
Cognito to Keycloak users converter
Turn a Cognito user CSV or list-users output into Keycloak import JSON, with custom attributes and groups. Runs in your browser.
Open Free toolMigration readiness checklist
A checklist for moving users to Keycloak from Auth0, Okta, Cognito, Azure AD B2C, Firebase or another Keycloak: export, map, dry run, cut-over and rollback.
Open Free toolMigration email templates
Write the emails you send your own users before the move, on the day and after it, including how they set a new password.
Open Free toolPKCE generator
Generate a code verifier and its S256 code challenge for the authorization code flow with PKCE.
OpenAbout moving from Amazon Cognito
Can my Cognito users keep their passwords?
No. Cognito does not export passwords or hashes, so users set a new password by email link.
How do I export users from Cognito?
With aws cognito-idp list-users, plus admin-list-groups-for-user for groups. Cognito has an import job but no export job.
What happens to custom attributes?
They become Keycloak attributes without the custom: prefix, declared in the realm’s user profile.
My backend uses the Cognito sub. What now?
The converter keeps it as the cognito_sub attribute. Map it into tokens, or look users up by it on their first sign-in.
Do Lambda triggers move?
No. Token claims become mappers, sign-up checks become required actions or app code, and migration triggers are no longer needed.
Can I stay on AWS?
Yes. Clusters run on AWS Frankfurt or AWS N. Virginia, or on Azure West Europe.
How long does a move from Cognito take?
It depends on the number of app clients, triggers and identity providers, and on your users’ notice period. We do not give a number without seeing what you run.
Who does the work?
On Premium and Enterprise we do the move with you, within the plan’s 10 service hours a month. On Starter you move with our free tools and guides.
Where the facts on this page come from
Read on 25 November 2026. Vendors change their products: if one of these has, tell us through the contact form and we will correct this page.
Moving from somewhere else
From Auth0
Users, metadata, social logins and apps move. Passwords are set again by email link.
Read the plan New password by email linkFrom Okta
Users, profile attributes, groups and apps move. Passwords are set again by email link.
Read the plan New password by email linkFrom Azure AD B2C or Entra External ID
Users, sign-in names and extension attributes move. Passwords are set again by email link.
Read the plan New password by email linkFrom Firebase Authentication
Users, custom claims and social logins move. Passwords are set again by email link.
Read the plan Passwords keptFrom your own Keycloak or Red Hat SSO
Realms move whole, with password hashes and keys. Users keep their passwords.
Read the plan Kept with a full exportFrom another Keycloak host
With a full export, realms move whole and users keep their passwords.
Read the planReady to move?
Order a cluster, or write to us first about what you run today.