Stay up to date with the latest from the Knowledge Center. See all new Knowledge Center articles published in the last month, and re:Post's top contributors.
REST API 与 S3 集成中的 OPTIONS 方法出现 500 内部服务器错误
0
【以下的问题经过翻译处理】 我无法在 REST API 与 S3 集成上设置 CORS。 我正在尝试配置我的资源以返回我的存储桶中的对象列表。 我启用了 CORS,它创建了 OPTIONS 方法,但是当我从 JS 或curl 发出 OPTIONS 请求时,我收到 500 内部服务器错误。 我已在 CloudWatch 上启用详细日志,并且看到以下内容:
'''
Method request body before transformations: [Binary Data]
Execution failed due to configuration error: Unable to transform request
Method completed with status: 500
'''
curl响应:
'''
< HTTP/2 500
< date: Wed, 18 Jan 2023 21:43:27 GMT
< content-type: application/json
< content-length: 36
< x-amzn-requestid: e31e295f-2d8a-4cb5-892e-2b1b517f3650
< x-amzn-errortype: InternalServerErrorException
< x-amz-apigw-id: xxxxxxx
<