Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cognito-local

> 编程语言
Open source

Local emulator for Amazon Cognito

389 stars0 likes0 views
WebsiteGitHub

About

Local emulator for Amazon Cognito

Cognito Local

A Good Enough offline emulator for Amazon Cognito.

  • Supported Features
    • Lambda triggers
  • Usage
    • via Docker
    • via Node
    • Using a different port
    • Updating your application
    • Creating your first User Pool
  • Configuration
    • Custom Email Sender Trigger
    • HTTPS endpoints with self-signed certificates
    • User Pools and Clients
  • Known Limitations
  • Multi-factor authentication
  • Confirmation codes
  • Advanced
    • Debugging Cognito Local

Supported Features

Feature Support
AddCustomAttributes ✅
AdminAddUserToGroup ✅
AdminConfirmSignUp ✅
AdminCreateUser (partial support)
AdminDeleteUser ✅
AdminDeleteUserAttributes ✅
AdminDisableProviderForUser ❌
AdminDisableUser ✅
AdminEnableUser ✅
AdminForgetDevice ❌
AdminGetDevice ❌
AdminGetUser ✅
AdminInitiateAuth (partial support)
AdminLinkProviderForUser ❌
AdminListDevices ❌
AdminListGroupsForUser ✅
AdminListUserAuthEvents ❌
AdminRemoveUserFromGroup ✅
AdminResetUserPassword ❌
AdminRespondToAuthChallenge ❌
AdminSetUserMFAPreference ❌
AdminSetUserPassword ✅
AdminSetUserSettings ❌
AdminUpdateAuthEventFeedback ❌
AdminUpdateDeviceStatus ❌
AdminUpdateUserAttributes ✅
AdminUserGlobalSignOut ❌
AssociateSoftwareToken (partial support)
ChangePassword ✅
ConfirmDevice ❌
ConfirmForgotPassword (partial support)
ConfirmSignUp (partial support)
CreateGroup ✅
CreateIdentityProvider ❌
CreateResourceServer ❌
CreateUserImportJob ❌
CreateUserPool ✅
CreateUserPoolClient ✅
CreateUserPoolDomain ❌
DeleteGroup ✅
DeleteIdentityProvider ❌
DeleteResourceServer ❌
DeleteUser ✅²
DeleteUserAttributes ✅
DeleteUserPool ✅²
DeleteUserPoolClient ✅²
DeleteUserPoolDomain ❌
DescribeIdentityProvider ❌
DescribeResourceServer ❌
DescribeRiskConfiguration ❌
DescribeUserImportJob ❌
DescribeUserPool ✅
DescribeUserPoolClient ✅
DescribeUserPoolDomain ❌
ForgetDevice ❌
ForgotPassword (partial support)
GetCSVHeader ❌
GetDevice ❌
GetGroup ✅²
GetIdentityProviderByIdentifier ❌
GetSigningCertificate ❌
GetUICustomization ❌
GetUser ✅
GetUserAttributeVerificationCode ✅
GetUserPoolMfaConfig ✅
GlobalSignOut ❌
InitiateAuth (partial support)
ListDevices ❌
ListGroups ✅¹
ListIdentityProviders ❌
ListResourceServers ❌
ListTagsForResource ❌
ListUserImportJobs ❌
ListUserPoolClients ✅¹
ListUserPools ✅¹
ListUsers ✅¹
ListUsersInGroup ✅¹
ResendConfirmationCode ❌
RespondToAuthChallenge (partial support)
RevokeToken (partial support)
SetRiskConfiguration ❌
SetUICustomization ❌
SetUserMFAPreference ✅
SetUserPoolMfaConfig ✅
SetUserSettings ❌
SignUp (partial support)
StartUserImportJob ❌
StopUserImportJob ❌
TagResource ❌
UntagResource ❌
UpdateAuthEventFeedback ❌
UpdateDeviceStatus ❌
UpdateGroup ✅
UpdateIdentityProvider ❌
UpdateResourceServer ❌
UpdateUserAttributes ✅
UpdateUserPool ✅
UpdateUserPoolClient ✅²
UpdateUserPoolDomain ❌
VerifySoftwareToken (partial support)
VerifyUserAttribute ✅

¹ does not support pagination or attribute filters, all results and attributes will be returned in the first request.

² "requires developer credentials" is not enforced

Additional supported features:

  • JWKs verification

Lambda triggers

cognito-local can emulate Cognito's Lambda Triggers by either invoking a real Lambda in an AWS account or a Lambda running on your local machine (via any tool which supports the LambdaInvoke functionality, for example serverless-offline).

To configure a Lambda Trigger, modify your configuration file to include a TriggerFunctions object with a key for the Trigger and the value as your Lambda function name.

json
{
  "TriggerFunctions": {
    "CustomMessage": "my-function-name"
  }
}

If you're using local invoke, you will also need to modify the LambdaClient.endpoint configuration to tell cognito-local how to connect to your local Lambda server:

json
{
  "LambdaClient": {
    "endpoint": "http://host:port"
  },
  "TriggerFunctions": {
    "CustomMessage": "my-local-function-name"
  }
}

If you're running cognito-local in Docker and your local Lambda functions on your host, you may need to use the Docker local networking hostname as your endpoint. For example, on my Mac I use http://host.docker.internal:3002.

Supported Lambda Triggers

Trigger Operation Support
CreateAuthChallenge * ❌
CustomEmailSender CustomEmailSender_SignUp ✅
CustomEmailSender CustomEmailSender_ResendCode ✅
CustomEmailSender CustomEmailSender_ForgotPassword ✅
CustomEmailSender CustomEmailSender_UpdateUserAttribute ✅
CustomEmailSender CustomEmailSender_VerifyUserAttribute ✅
CustomEmailSender CustomEmailSender_AdminCreateUser ✅
CustomEmailSender CustomEmailSender_AccountTakeOverNotification ❌
CustomMessage AdminCreateUser ✅
CustomMessage Authentication ✅
CustomMessage ForgotPassword ✅
CustomMessage ResendCode ❌
CustomMessage SignUp ✅
CustomMessage UpdateUserAttribute ✅
CustomMessage VerifyUserAttribute ✅
DefineAuthChallenge * ❌
PostAuthentication PostAuthentication_Authentication ✅
PostConfirmation ConfirmForgotPassword ✅
PostConfirmation ConfirmSignUp ✅
PreAuthentication * ❌
PreSignUp PreSignUp_AdminCreateUser ❌
PreSignUp PreSignUp_ExternalProvider ❌
PreSignUp PreSignUp_SignUp ✅
PreTokenGeneration TokenGeneration_AuthenticateDevice ❌
PreTokenGeneration TokenGeneration_Authentication ✅
PreTokenGeneration TokenGeneration_HostedAuth ❌
PreTokenGeneration TokenGeneration_NewPasswordChallenge ❌
PreTokenGeneration TokenGeneration_RefreshTokens ✅
UserMigration Authentication ✅
UserMigration ForgotPassword ❌
VerifyAuthChallengeResponse * ❌

Known limitations

  1. Incomplete support for triggers
  2. Triggers can only be configured globally and not per-pool

Usage

via Docker

bash
docker run --publish 9229:9229 jagregory/cognito-local:latest

Cognito Local will now be listening on http://localhost:9229.

To persist your database between runs, mount the /app/.cognito volume to your host machine:

bash
docker run --publish 9229:9229 --volume $(pwd)/.cognito:/app/.cognito jagregory/cognito-local:latest

via No

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言