I am building a POC using AWS Translate and one of the requirement is to use REST API.
I have constructed the below url :
but when I hit the url using POSTMAN I get the below error :
{
"__type": "UnknownOperationException"
}
I am building a POC using AWS Translate and one of the requirement is to use REST API.
I have constructed the below url :
but when I hit the url using POSTMAN I get the below error :
{
"__type": "UnknownOperationException"
}
I have managed to find a fix to my issue. The issue was that, I was expecting the "x-amz-target" header to have a friendly name e.g "translate" but from this link, the "x-amz-target" header needs to be "AWSShineFrontendService_20170701.TranslateText"
Solution:
In postman, I created a new POST request.
I then changed the URL specific to an AWS Translate region from:
to :
Under "Headers" I added the following headers:
Content-Type: application/x-amz-json-1.1
X-Amz-Target: AWSShineFrontendService_20170701.TranslateText
Under "Body", I selected "raw", and added the following sample body:
After testing again I got it working, as you can see in the screenshot below :