Search code examples
amazon-web-servicesamazon-s3postmanface-recognition

Amazon Face Recognition error in POSTMAN


I want to integrate Amazon Rekognition for the Face Recognition.

I have created bucket and IAM user. I am trying to hit "RekognitionService.ListCollections" for the testing in POSTMAN but getting error as follows;

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

My request header is as follows;

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

Can anyone please guide me how to test AWS apis in POSTMAN ?


Solution

  • Use your Accesskey,SecretKey and service name as rekognition in AWS singature

    enter image description here

    Add empty JSON like {} in body parameter as raw.

    After updating request your header look like this

    enter image description here

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