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.
My step:
Cognito does not trigger post confirm when the user is created with adminCreateUser
or manually from Cognito dashboard.
I am looking for the answer to this as well and I found this in the official documentation:-
You create custom workflows by assigning AWS Lambda functions to user pool triggers. When you use the AdminCreateUser API action, Amazon Cognito invokes the function that is assigned to the pre sign-up trigger. When Amazon Cognito invokes this function, it passes a JSON payload, which the function receives as input.
So basically we need to attach the lambda function to the pre sign-up trigger if we are using the AdminCreateUser API action. Haven't checked if it works. Confirmation would be great!
Update:-
I tried it out myself and it does trigger the pre sign-up lambda function. So there's the confirmation!
As the name suggests, it is post "confirmation" trigger. The user needs to confirm the email belongs to him/her. This is done by entering the OTP that cognito sends to the given email address. Once the user enters that OTP, the email address is confirmed and post confirmation trigger fires.
Do Use the hosted UI's "Signup" link to create the account
Do Not Use Cognito service's in-built user creation page. Use Admin API