How to use Postman to hit AWS Comprehend Endpoint

0

Hi,

I have a custom classifierDocument endpoint that has been configured in AWS Comprehend and is ready for real time analysis and works well. I am now trying to hit that endpoint with Postman, but i keep getting an error. Is my url incorrect or one of my headers? The error and postman configs are as follows:

Postman Config:
Post: https://comprehend.us-east-1.amazonaws.com/

Authorization:
AWS Signature
AccessKey: <AK>
SecretKey: <SK>
AWS Region: us-east-1
Service Name: comprehend:ClassifyDocument

Headers:
Auth: <stuff>
X-AMZ-Content-SHA256: <stuff>
X-AMZ-Date: <stuff>
Content-Type: application/json
Host: <stuff>
PostmanToken: <stuff>
User Agent: <stuff>
Accept: all
AcceptEncoding: gzip, deflate, br
Connection: keep alive

Body:
raw-text
{
"Text": "Emotional Intelligence (EQ), popularized by best-selling author Daniel Goleman has been validated with multiple research studies to be a key differentiator in work performance. Emotions",
"EndpointArn": "arn:aws:comprehend:us-east-1:[stuff]:document-classifier-endpoint/pravsFirstEnd"
}

Text Response Error:
<AccessDeniedException>
<Message>Unable to determine service/operation name to be authorized</Message>
</AccessDeniedException>

Json Response Error:
{
"Output": {
"__type": "com.amazon.coral.service#UnknownOperationException"
},
"Version": "1.0"
}

prav1
질문됨 4년 전2288회 조회
1개 답변
0

Hi,

Referred to an older post/forum made by ForzenCoder(RestAPI with Comprehend) and saw what was missing. Note to to future peeps running into this issue.

Changes/Additions Made:
Service - comprehend
X-Amz-Target - Comprehend_20171127.ClassifyDocument
Content-Type - application/x-amz-json-1.1

Getting proper response now. All is well.

prav1
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠