Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I am trying to implement an auto-confirm mechanism in AWS, I'm getting an error due to the Lambda response. I can't find the correct return type in the docs.

Lambda:

exports.handler = (event, context, callback) => {

    event.response.autoConfirmUser = true;

    context.succeed(event.response);

}; 

Exception:

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

1 Answer

0 votes
by (44.4k points)

You should use context.done(null, event); or context.succeed(event) at the end of the trigger as mentioned in Cognito developer guide.

Check this documentation for more details.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories

...