Authenticate AWS API gateway with AWS_IAM and API key from REST client Postman
<p>I am trying to access authenticated POST API gateway with postman rest client, but I am getting status 403 with forbidden message.</p>

<p>{
  "message": "Forbidden"
}</p>

<p>I am using AWS Signature Authentication with AccessKey, SecretKey, AWS Region and Service Name. I don't understand why its not allowing my rest call, is it something to do with my AccessKey and SecretKey pair lacking authorisation?? (My user is Admin thought)</p>

<pre><code>$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL =&gt; "https://xxxxxxxxxx.execute-api.us-west-2.amazonaws.com/dev/score",
  CURLOPT_RETURNTRANSFER =&gt; true,
  CURLOPT_ENCODING =&gt; "",
  CURLOPT_MAXREDIRS =&gt; 10,
  CURLOPT_TIMEOUT =&gt; 30,
  CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST =&gt; "POST",
  CURLOPT_POSTFIELDS =&gt; "input1=1&amp;input2=2",
  CURLOPT_HTTPHEADER =&gt; array(
    "authorization: AAAA-AAAA-XXX123 Credential=XXXXXXXXXX/20160414/us-west-2/execute-api/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=sdddddssdddddddddddddddddsdsdsdsdsdsdsdsdsdsd",
    "cache-control: no-cache",
    "content-type: application/javascript",
    "host: xxxxxxxxxx.execute-api.us-west-2.amazonaws.com",
    "postman-token: abf462fe-24ae-244d-ba8d-d3e953f0e712",
    "x-amz-date: 20160414T084331Z"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
</code></pre>