scenarios/features/user_pools_and_lambda_triggers/README.md
This example shows how to use AWS SDKs to customize Amazon Cognito authentication behavior. You can configure your Amazon Cognito user pool to automatically invoke AWS Lambda functions at various points in the authentication process, such as before sign-up, during sign-in, and after authentication.
There are three scenarios demonstrated by this example:
A pre sign-up Lambda trigger is invoked when a user starts the sign-up process and lets your Lambda function take action before Amazon Cognito adds the user to the user pool.
This scenario demonstrates the following steps and tasks:
PreSignUp trigger.SignUp action to sign-up with Amazon Cognito.A migrate user Lambda trigger is invoked when a user doesn't exist in the user pool at sign-in with a password. After the Lambda function returns successfully, Amazon Cognito creates the user in the user pool.
This scenario demonstrates the following steps and tasks:
MigrateUser trigger.A post authentication Lambda trigger is invoked after signing in a user, so you can add custom logic after Amazon Cognito authenticates the user.
This scenario demonstrates the following steps and tasks:
PostAuthentication trigger.This example is implemented in the following languages:
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0