我正在使用 NodeJS AWS SDK 文本来检测图像(图像文件点 PNG/JPG)。它在 AWS EC2 上运行。但它不适用于 AWS Lambda 函数。
我得到了回应:
{
"err": {
"message": "Request has unsupported document format",
"code": "UnsupportedDocumentException",
"time": "2019-12-07T08:49:52.788Z",
"requestId": "fbd1cab5-d725-4f79-ac15-1f033e82aa79",
"statusCode": 400,
"retryable": false,
"retryDelay": 37.87986431208581
},
"stack": "UnsupportedDocumentException: Request has unsupported document format\n at Request.extractError (/var/task/node_modules/aws-sdk/lib/protocol/json.js:51:27)\n at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\n at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)\n at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)\n at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)\n at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10\n at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)\n at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:685:12)\n at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:116:18)"
}