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.

2 Respostas
-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
ESPECIALISTA
respondido há um ano
  • Please ask questions in comments

-1

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

profile picture
ESPECIALISTA
respondido há um ano
  • Please ask questions in comments

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas