<?php $query_string = substr($query_string, 0, -1);
$canonical_request = "GET\n" . $encoded_uri . "\n" . $query_string . "\n" . $header_string . "\n" . $signed_headers_string . "\nUNSIGNED-PAYLOAD";
$string_to_sign = $algorithm . "\n" . $time_text . "\n" . $scope . "\n" . hash('sha256', $canonical_request,
false);
$signing_key = hash_hmac('sha256', 'aws4_request',
hash_hmac('sha256', 's3',
hash_hmac('sha256', $AWSRegion,