I'm trying to insert a record into DynamoDB invoking "Pre sign-up" trigger of Cognito User Pool.
Lambda function is pretty simple for testing purposes but there is always an error in client application on AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool.signUp call
Use case 1
Lambda body:
console.log('Received event:', JSON.stringify(event, null, 2));
Result:
InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON
Use case 2
Lambda body:
callback("null", "success");
Result:
InvalidLambdaResponseException: Invalid lambda function output : Invalid JSON
Use case 3
Lambda body:
new AWS.DynamoDB.DocumentClient().put(params, callback);
Result:
InvalidLambdaResponseException: Invalid cognito sign in version. Version should be 1
So, any ideas what might be wrong?
Could the latest error might be related to the beta status of Cognito User Pool?
P.S. I will provide more details if needed. Thanks in advance.
event
in the callback, as well said @user1268855callback(null, event);
in my case I don't returnnull
as string. – Jose Carlos Ramos Carmenates