亚马逊面部识别错误在POSTMAN

oxf4rvwz  于 2023-03-18  发布在  Postman
关注(0)|答案(1)|浏览(118)

我想集成Amazon Rekognition用于人脸识别。
我已经创建了bucket和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吗?

cld4siwp

cld4siwp1#

在AWS签名中使用AccesskeySecretKey和服务名称rekognition

在body参数中添加类似{}的空JSON作为raw
更新请求后,您的标题如下所示

添加新标题X-Amz-Target值作为RekognitionService.ListCollections,添加新标题Content-Type值作为application/x-amz-json-1.1

相关问题