-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
credentialScope
is not applied
#701
Comments
Hi @angelsl please provide more information, how have you configured ExAws's credentials? |
As part of configuration: config :ex_aws,
access_key_id: "...",
secret_access_key: "...",
region: "ap-southeast-1" Specifying ExAws.request(%ExAws.Operation.RestQuery{http_method: :get, path: "/things/receiver-test-test", service: :iot }, service_override: :"execute-api")
{:ok,
%{
body: "...",
headers: [
{"Date", "Tue, 07 Jul 2020 18:43:16 GMT"},
{"Content-Type", "application/json"},
{"Content-Length", "285"},
{"Connection", "keep-alive"},
{"x-amzn-RequestId", "..."},
{"Access-Control-Allow-Origin", "*"},
{"x-amz-apigw-id", "..."},
{"X-Amzn-Trace-Id", "..."}
],
status_code: 200
}} |
I still don't understand this error. please provide more information about what should be happening, what is credentialScope? |
I'm referring to this. When making an AWS request, you use your access key and secret key to derive a HMAC key to sign the request. The credential scope is used in the derivation. For most services, the credential scope is identical to the service name. For some services, it is not. |
Basically, what should be happening is that ExAws uses the correct credential scope based on the service name specified. The data is even there in |
Got it, thanks! I'll look into it. |
I am willing to look at this, would be useful in removing the override needed in #1023 ? |
@devstopfix I'm not actually sure if it would be useful in removing it - my reading of this bug is that the overrides aren't actually working in the first place. But I haven't really looked into this issue at all since I took over from Ben, so do please feel free to do any digging you like and let us know what you find. |
Environment
Current behavior
credentialScope
frompriv/endpoints.exs
does not seem to be applied:Expected behavior
The request should succeed.
The text was updated successfully, but these errors were encountered: