interface UserPoolTriggers
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.UserPoolTriggers |
Java | software.amazon.awscdk.services.cognito.UserPoolTriggers |
Python | aws_cdk.aws_cognito.UserPoolTriggers |
TypeScript (source) | @aws-cdk/aws-cognito » UserPoolTriggers |
Triggers for a user pool.
Example
const authChallengeFn = new lambda.Function(this, 'authChallengeFn', {
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, 'path/to/asset')),
});
const userpool = new cognito.UserPool(this, 'myuserpool', {
// ...
lambdaTriggers: {
createAuthChallenge: authChallengeFn,
// ...
},
});
userpool.addTrigger(cognito.UserPoolOperation.USER_MIGRATION, new lambda.Function(this, 'userMigrationFn', {
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, 'path/to/asset')),
}));
Properties
Name | Type | Description |
---|---|---|
create | IFunction | Creates an authentication challenge. |
custom | IFunction | Amazon Cognito invokes this trigger to send email notifications to users. |
custom | IFunction | A custom Message AWS Lambda trigger. |
custom | IFunction | Amazon Cognito invokes this trigger to send SMS notifications to users. |
define | IFunction | Defines the authentication challenge. |
post | IFunction | A post-authentication AWS Lambda trigger. |
post | IFunction | A post-confirmation AWS Lambda trigger. |
pre | IFunction | A pre-authentication AWS Lambda trigger. |
pre | IFunction | A pre-registration AWS Lambda trigger. |
pre | IFunction | A pre-token-generation AWS Lambda trigger. |
user | IFunction | A user-migration AWS Lambda trigger. |
verify | IFunction | Verifies the authentication challenge response. |
createAuthChallenge?
Type:
IFunction
(optional, default: no trigger configured)
Creates an authentication challenge.
customEmailSender?
Type:
IFunction
(optional, default: no trigger configured)
Amazon Cognito invokes this trigger to send email notifications to users.
customMessage?
Type:
IFunction
(optional, default: no trigger configured)
A custom Message AWS Lambda trigger.
customSmsSender?
Type:
IFunction
(optional, default: no trigger configured)
Amazon Cognito invokes this trigger to send SMS notifications to users.
defineAuthChallenge?
Type:
IFunction
(optional, default: no trigger configured)
Defines the authentication challenge.
postAuthentication?
Type:
IFunction
(optional, default: no trigger configured)
A post-authentication AWS Lambda trigger.
postConfirmation?
Type:
IFunction
(optional, default: no trigger configured)
A post-confirmation AWS Lambda trigger.
preAuthentication?
Type:
IFunction
(optional, default: no trigger configured)
A pre-authentication AWS Lambda trigger.
preSignUp?
Type:
IFunction
(optional, default: no trigger configured)
A pre-registration AWS Lambda trigger.
preTokenGeneration?
Type:
IFunction
(optional, default: no trigger configured)
A pre-token-generation AWS Lambda trigger.
userMigration?
Type:
IFunction
(optional, default: no trigger configured)
A user-migration AWS Lambda trigger.
verifyAuthChallengeResponse?
Type:
IFunction
(optional, default: no trigger configured)
Verifies the authentication challenge response.