我想集成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吗?
1条答案
按热度按时间cld4siwp1#
在AWS签名中使用
Accesskey
、SecretKey
和服务名称rekognition
在body参数中添加类似
{}
的空JSON
作为raw
。更新请求后,您的标题如下所示
添加新标题
X-Amz-Target
值作为RekognitionService.ListCollections
,添加新标题Content-Type
值作为application/x-amz-json-1.1