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!

Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande