{"action":"created","issue":{"url":"https://api.github.com/repos/mhart/aws4/issues/16","labels_url":"https://api.github.com/repos/mhart/aws4/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/mhart/aws4/issues/16/comments","events_url":"https://api.github.com/repos/mhart/aws4/issues/16/events","html_url":"https://github.com/mhart/aws4/issues/16","id":124958571,"number":16,"title":"AWS API Gateway compatability","user":{"login":"jimmyn","id":5391775,"avatar_url":"https://avatars.githubusercontent.com/u/5391775?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyn","html_url":"https://github.com/jimmyn","followers_url":"https://api.github.com/users/jimmyn/followers","following_url":"https://api.github.com/users/jimmyn/following{/other_user}","gists_url":"https://api.github.com/users/jimmyn/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyn/subscriptions","organizations_url":"https://api.github.com/users/jimmyn/orgs","repos_url":"https://api.github.com/users/jimmyn/repos","events_url":"https://api.github.com/users/jimmyn/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-05T12:32:13Z","updated_at":"2016-01-06T20:53:13Z","closed_at":null,"body":"I'm trying to setup headers for API Gateway\r\nI use cognito temporary credentials. I've tried different approaches but I'm still getting ```InvalidSignatureException```\r\n\r\n```\r\nvar options = aws4.sign({\r\n            service: 'execute-api',\r\n            region: 'us-east-1',\r\n            hostname: 'https://tzg20cqzbj.execute-api.us-east-1.amazonaws.com',\r\n            path: 'https://tzg20cqzbj.execute-api.us-east-1.amazonaws.com/development/users/',\r\n            headers: {\r\n                'Content-Type': 'application/json',\r\n                'authToken': auth.idToken,\r\n                'Accept': 'application/json'\r\n            }\r\n\r\n        }, {\r\n            accessKeyId: AWS.config.credentials.accessKeyId,\r\n            secretAccessKey: AWS.config.credentials.secretAccessKey,\r\n            sessionToken: AWS.config.credentials.sessionToken\r\n        });\r\n        \r\n        delete options.headers['Host'];\r\n\r\n        $http({\r\n            method: 'GET',\r\n            url: 'https://tzg20cqzbj.execute-api.us-east-1.amazonaws.com/development/users/',\r\n            headers: options.headers\r\n        }).then(function successCallback(response) {\r\n            console.log(response);\r\n        }, function errorCallback(response) {\r\n            console.log(response);\r\n        });\r\n```"},"comment":{"url":"https://api.github.com/repos/mhart/aws4/issues/comments/169457798","html_url":"https://github.com/mhart/aws4/issues/16#issuecomment-169457798","issue_url":"https://api.github.com/repos/mhart/aws4/issues/16","id":169457798,"user":{"login":"mhart","id":367936,"avatar_url":"https://avatars.githubusercontent.com/u/367936?v=3","gravatar_id":"","url":"https://api.github.com/users/mhart","html_url":"https://github.com/mhart","followers_url":"https://api.github.com/users/mhart/followers","following_url":"https://api.github.com/users/mhart/following{/other_user}","gists_url":"https://api.github.com/users/mhart/gists{/gist_id}","starred_url":"https://api.github.com/users/mhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhart/subscriptions","organizations_url":"https://api.github.com/users/mhart/orgs","repos_url":"https://api.github.com/users/mhart/repos","events_url":"https://api.github.com/users/mhart/events{/privacy}","received_events_url":"https://api.github.com/users/mhart/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T20:53:13Z","updated_at":"2016-01-06T20:53:13Z","body":"@jimmyn same goes in your case actually – the hostname (or host) should not include the protocol – so remove the `https://` and see how you go."}}