in Dotnet Core/aws-iot-http-sigv4-dotnet-app/aws-iot-http-sigv4-dotnet-app/Program.cs [40:71]
        private static Dictionary<string, string> BuildHeaders(Uri uri, string payload) 
        {
            byte[] contentHash = AWS4SignerBase.CanonicalRequestHashAlgorithm.ComputeHash(Encoding.UTF8.GetBytes(payload));
            string contentHashString = AWS4SignerBase.ToHexString(contentHash, true);
            var headers = new Dictionary<string, string>
            {
                {AWS4SignerBase.X_Amz_Content_SHA256, contentHashString},
                {"content-length", payload.Length.ToString()},
                {"content-type", "text/plain"}
            };
            var uriWithoutQueryString = new Uri(uri.GetLeftPart(UriPartial.Path));
            var signer = new AWS4SignerForAuthorizationHeader
            {
                EndpointUri = uriWithoutQueryString,
                HttpMethod = "POST",
                Service = "iotdevicegateway",
                Region = "us-east-1"
            };
            string AWSAccessKey = ConfigHelper.ReadSetting("accesskey");
            string AWSSecretKey = ConfigHelper.ReadSetting("secretkey");
            string queryStringWithoutLeadingQuestionMark = string.IsNullOrEmpty(uri.Query) ? string.Empty : uri.Query.Substring(1);
            var authorization = signer.ComputeSignature(headers, queryStringWithoutLeadingQuestionMark, contentHashString, AWSAccessKey, AWSSecretKey);
            // express authorization for this as a header
            headers.Add("Authorization", authorization);
            return headers;
        }