邮递员中的亚马逊人脸识别错误

Amazon Face Recognition error in POSTMAN

我想集成 Amazon Rekognition 进行人脸识别。

我已经创建了存储桶和 IAM 用户。我正在尝试点击 "RekognitionService.ListCollections" 在 POSTMAN 中进行测试,但出现如下错误;

 <InvalidSignatureException>   <Message>Credential should be scoped to
 correct service: 'rekognition'. </Message>
 </InvalidSignatureException>

我的请求头如下;

https://rekognition.us-east-2.amazonaws.com/

x-amz-content-sha256:STREAMING-AWS4-HMAC-SHA256-PAYLOAD
X-Amz-Target:RekognitionService.ListCollections
X-Amz-Date:20180130T123032Z
Host:rekognition.us-east-2.amazonaws.com
Content-Length:142
Authorization:AWS4-HMAC-SHA256 Credential=XXXXXXXXXX/20180130/us-east-2/RekognitionService.ListCollections/aws4_request, SignedHeaders=accept-encoding;content-length;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=xxxxxxxxxxx
Content-Type:application/x-www-form-urlencoded
Accept-Encoding:identity

谁能指导我如何在 POSTMAN 中测试 AWS api?

在 AWS 签名

中使用您的 AccesskeySecretKey 和服务名称作为 rekognition

在 body 参数中添加空 JSON{} 作为 raw.

更新请求后,您的 header 看起来像这样

Add new header X-Amz-Target value as RekognitionService.ListCollections and Content-Type as application/x-amz-json-1.1