AWS Amplify Cognito from Android - InvalidLambdaResponseException

0

I try to log in to Cognito by doing this:

Amplify.Auth.signIn( "prueba", "prueba1234aB", result -> Log.i("AuthQuickstart", result.isSignInComplete() ? "Sign in succeeded" : "Sign in not complete"), error -> Log.e("AuthQuickstart", error.toString()) );

and get this error:

AuthException{message=Sign in failed, cause=com.amazonaws.services.cognitoidentityprovider.model.InvalidLambdaResponseException: Unrecognizable lambda output (Service: AmazonCognitoIdentityProvider; Status Code: 400; Error Code: InvalidLambdaResponseException; Request ID: [...]

My goal is to get the user credentials, so I can work with them when it comes to using other AWS services.

I tried logging in from the web interface Amazon provides to test users and it did work, so it should not be the user fields' fault.

What am I doing wrong exactly? Is it something about the code? Or maybe something about the pre-authentication triggered Lambda? If so, how should I deal with the response I'm returning from that Lambda?

Thanks in advance!

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions