Skip to content
Migrate

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

The short answer

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

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.

WhatIn the moveHow
Users and standard attributesMovesEmail, verified flag, names, phone number, locale and the others.
Custom attributesMovescustom:name becomes the attribute name, declared in the user profile.
The sub (user id)MovesKept as an attribute; Keycloak gives each user a new id.
GroupsMovesFrom admin-list-groups-for-user, as Keycloak groups.
PasswordsDoes not moveCognito does not export them; users set a new password by email link.
MFA (TOTP, SMS)Does not moveNo secrets are exported; users enroll again. Keycloak has no built-in SMS codes.
Social and SAML providersRe-createdRe-created as identity providers; users re-link by email.
App clients and hosted UIRe-createdRe-created as clients with callback URLs and scopes.
Lambda triggersDoes not moveRewritten as mappers, required actions or app code.
Active sessionsDoes not moveEveryone signs in once after the switch.
Branded sign-in pagesDoes not moveClusters run Keycloak’s own themes. Custom themes are not supported yet.
Passwords

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.

Getting the data out

The export

  1. List users with aws cognito-idp list-users.
  2. List each user’s groups with admin-list-groups-for-user, or each group’s users.
  3. 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.

The plan

Moving from Amazon Cognito, step by step

  1. 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. 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. 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. 4

    Tell your users

    Announce the date and the new password by email link, and that authenticator apps are set up again.

  5. 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. 6

    Keep a way back

    Keep the user pool unchanged until you sign the move off, and write down how each app switches back.

How long it takes

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
Who does the work

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.

Starter

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
You
  • 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
Premium and Enterprise

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
You
  • 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
Custom

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
You
  • 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.

Questions

About 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.

Sources

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.

  1. AWS: ListUsers API reference
  2. AWS: Cognito user profiles export guidance (limitations)
  3. AWS: Importing users into user pools from a CSV file

Ready to move?

Order a cluster, or write to us first about what you run today.