0

I'm trying to implement the AWS Congito Custom Authentication flow for User pool (as suggested in their documentation. I have defined very basic logic in the define, create and verify challenges.

  1. My define-challenge Lambda does not use any SRP or user_password authentication and issues a "CUSTOM_CHALLENGE" with only a single session event.
  2. My create-challenge Lambda similarly has a very simple logic of asking for a single input.
  3. My verify-challenge Lambda just prints the input and returns a success (for any kind of input)

I currently dont see the <cognito_domain>/login?client_id=etc triggering any of these Lambdas that I have defined in the User Pool settings. The lambda invocation metrics also dont show any calls made by Cognito to Lambda. I'm pretty sure I've added the Lambda triggers to the userpool properly and I can see the userpool has the permission to invoke the lambda as well (adding the lambda triggers from the console automatically adds the permissions as well). enter image description here

How do I get Cognito to start triggering my Custom Authentication lambdas?

1 Answers1

1

According to this document, they said that

Note The Amazon Cognito hosted sign-in webpage can't activate Custom authentication challenge Lambda triggers.

You have to write your own custom login flow using one of Cognito's SDKs

hoangdv
  • 15,138
  • 4
  • 27
  • 48