Use this to group Amazon Cognito-based sub-queries related to Lambda triggers.
Questions tagged [amazon-cognito-triggers]
79 questions
18
votes
2 answers
lambda trigger callback vs context.done
I was following the guide here for setting up a presignup trigger.
However, when I used callback(null, event) my lambda function would never actually return and I would end up getting an error
{ code: 'UnexpectedLambdaException',
name:…

TemporaryFix
- 2,008
- 3
- 30
- 54
15
votes
3 answers
Configure Cognito to send emails through third party such as SendGrid the proper way
I have tried to invoke the custom message function to send emails through SendGrid, well it worked but I don't have a way to stop AWS from sending through their emails. I have tried to set the messageAction to "SUPPRESS" but another problem arises.…

Kim Toston
- 151
- 1
- 6
11
votes
3 answers
Post Confirmation doesn't trigger lambda function
My step:
I created user by calling the AdminCreateUser API.
I use my custom login form to do the first login
I change password (because I'm in FORCE_PASSWORD_CHANGE status)
Now the user is CONFIRMED
Trigger doesn't fire.

Deepak
- 261
- 1
- 9
8
votes
0 answers
AWS Cognito: Pass custom attributes for social media logins
I would like to implement a referral program for user signups and am looking to store the referee information as custom attributes in Cognito. I am using Amplify SDK for the same.
I am able to store the custom attributes for custom logins (using…

Repakula Srushith
- 444
- 1
- 3
- 10
6
votes
1 answer
Migrating social accounts (Google, Facebook) using AWS Cognito Migration Triggers
We have a Cognito user pool that we'd like to migrate to a new User Pool to take advantage of some different configuration. However, our pool contains users signed up with email, Google, and Facebook.
I understand how to migrate email/password…

HMilbradt
- 3,980
- 16
- 31
6
votes
1 answer
Can I make a call to AWS Cognito via a Lambda through the API gateway?
My current stack is like this:
User creates an account via AWS Cognito
A post confirmation lambda is triggered which then adds further user details to a database
My database uses the sub id generated by cognito as the userId so they are the same.…

Blobafet
- 419
- 1
- 7
- 13
5
votes
1 answer
AWS Cognito send invalid DeviceName in authEvents
I used CognitoIdentityServiceProvider.adminListUserAuthEvents for getting user auth events but received an invalid result. I logged in from Opera but Cognito displays that I used Chrome 8 (this is a mistake).
I could fix that if I get original…

Alex Fomin
- 195
- 2
- 12
5
votes
3 answers
Cant set AWS cognito triggers using CLI
I am trying to set a lambda trigger on cognito for Auth Challenge using AWS-CLI, which involves DefinAuthChallenge, CreateAuthChallenge, VerifyAuthChallenge etc.
aws cognito-idp update-user-pool --user-pool-id <> --lambda-config…

Mukund Gandlur
- 861
- 1
- 12
- 35
5
votes
2 answers
Cognito Lambda trigger socket timeout
I have a Lambda trigger on my cognito resource for the presignup trigger.
I am following this example
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html#aws-lambda-triggers-pre-registration-example
I am…

TemporaryFix
- 2,008
- 3
- 30
- 54
4
votes
1 answer
Data-specific Authorization with AWS Amplify & AWS Cognito
Background
Hey, all. To start, I'm in the process of learning AWS Amplify / GraphQL, so I'm not sure if this is a GraphQL-specific question, or if it relates more to AWS Cognito. That said, if this question is considered off-topic, please direct me…

Donato Perconti
- 814
- 2
- 11
- 28
4
votes
1 answer
AWS Cognito pre token generation lambda trigger
Can we trigger pre token generation lambda in AWS Cognito for app clients (client credentials)?

Gursharan Aulakh
- 151
- 1
- 7
4
votes
0 answers
Serverless + Cognito, adminAddUserToGroup post confirm lambda trigger
I am crafting a post trigger lambda function with NodeJS to move a newly registered user to a specific pool:
const AWS = require('aws-sdk');
const cognito = new AWS.CognitoIdentityServiceProvider();
export const hello = (event, context, callback)…

ilrein
- 3,833
- 4
- 31
- 48
3
votes
0 answers
How to Force MFA_SETUP via Custom challenge for UserPool with OPTIONAL MFA after password verification in Cognito
I have a user pool where in want to use custom challenges along with TOTP MFA for authentication. I check if a user has TOTP setup or not in DefineAuthChallenge just after PASSWORD_VERIFIER challenge is complete. If not setup, I set next…

mihawk26
- 33
- 6
3
votes
3 answers
AWS Cognito custom authentication flow - initiateAuth giving error
I am trying to make a custom authentication flow using AWS Cognito so that i can send MFA codes via email instead through the cognito triggers. I am using the initiateAuth() method to do this which is correct according to the…

dynamo
- 184
- 13
3
votes
5 answers
How to send a custom message for CustomMessage_AdminCreateUser trigger?
When sending a custom email message for CustomMessage_AdminCreateUser trigger, I successfully change the emailSubject attribute in the event received from Amazon Cognito, but can't seem to change the emailMessage attribute.
The email sent from…

Josip Kolarić
- 456
- 1
- 7
- 21