Error occur when invoking Lambda function

0

When I invoke the lambda function the test succeeds, but get the following error. There seems to be no significant error according to the logs too.

The execution log: { "statusCode": 500, "body": ""An error occurred"" }

Log Output: START RequestId: a1a2fe4b-8a44-49fc-ba39-c5f76efd159e Version: $LATEST END RequestId: a1a2fe4b-8a44-49fc-ba39-c5f76efd159e REPORT RequestId: a1a2fe4b-8a44-49fc-ba39-c5f76efd159e Duration: 108.42 ms Billed Duration: 109 ms Memory Size: 128 MB Max Memory Used: 84 MB Init Duration: 470.16 ms

Lambda function: index.js

Test deployed: { "body": "{"input_text": "Example text", "input_file_path": "s3://bucket-name/file-path"}" }

  • Can you add some logs to your catch block to understand your exception, its likely DynamoDB is throwing an exception.

preguntada hace un año323 visualizaciones
2 Respuestas
-1

I would like to see the details of the error.
Can you confirm this by adding the following statement under line 34?

console.error(error);

Also, the item to put is not in the form of a key value, is this a problem?
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property

profile picture
EXPERTO
respondido hace un año
-1

In another question you have troubles with nano id import, was that solved?

profile picture
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas