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.

已提问 1 年前323 查看次数
2 回答
-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
专家
已回答 1 年前
-1

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

profile picture
专家
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容