Unrecognized Cognito Lambda Out

I am trying to implement an AWS mechanism in AWS, I get an error message due to a Lambda response. I cannot find the correct return type in the docs.

Lambda:

exports.handler = (event, context, callback) => {
    event.response.autoConfirmUser = true;
    context.succeed(event.response);
};

An exception:

Unrecognized lambda output (Service: AWSCognitoIdentityProviderService; Status code: 400; Error code: InvalidLambdaResponseException; Request ID: 5c7a2436-0515-11e7-b971-41a89adf53ea)

+4
source share
2 answers

As shown in the example run of PreSignUp in the Cognito developer guide, you should use context.done(null, event);either context.succeed(event);at the end of your trigger.

Cognito , , Cognito User Pools.

+7

.

. : Lambda

  1. cognito lambda.

TEST 3. API DONE.

0
source

Source: https://habr.com/ru/post/1671938/


All Articles