Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

295
Visualizações
InvalidLambdaResponseException : Invalid lambda function output : Invalid JSON + React

I'm trying to implement sign up using AWS amplify. Here is the code,

import { Auth } from 'aws-amplify';

async function signUp() {
    try {
        const { user } = await Auth.signUp({
            username,
            password,
            attributes: {
                email,         
                phone_number
            }
        });
        console.log(user);
    } catch (error) {
        console.log('error signing up:', error);
    }
}

But I'm getting the following 400 error,

InvalidLambdaResponseException : Invalid lambda function output : Invalid JSON

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This usually happens when there's a Sign-Up lambda trigger defined which is failing for some reason such as:

  • a code problem in the lambda causing a premature end
  • the response is not returned as expected: no return at all, returning with an invalid format or missing attributes in the response

You should check the lambda triggers in the userpool and check their cloudwatch logs for more information.

If the User is not created at all, most likely it's on the Pre sign-up Lambda trigger.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda