我在整个 aws 中遇到错误,主要与权限相关,但是当我检查我的策略是否按照 AWS 文档中的说明附加时。我想部署到 Deeplens 2019 版相机,但这里似乎没有任何工作是我运行测试时出现的 lambda 错误。
Response
{
"errorMessage": "An error occurred (InvalidS3ObjectException) when calling the DetectLabels operation: Unable to get object metadata from S3. Check object key, region and/or access permissions.",
"errorType": "InvalidS3ObjectException",
"stackTrace": [
" File \"/var/task/greengrassHelloWorld.py\", line 35, in lambda_handler\n response = rekognition.detect_labels(Image=image, MaxLabels=123, MinConfidence=50)\n",
" File \"/var/runtime/botocore/client.py\", line 357, in _api_call\n return self._make_api_call(operation_name, kwargs)\n",
" File \"/var/runtime/botocore/client.py\", line 676, in _make_api_call\n raise error_class(parsed_response, operation_name)\n"
]
}
我已经完成了大部分建议的修复,包括区域设置和策略