aws / aws-sdk-go

AWS SDK for the Go programming language.
http://aws.amazon.com/sdk-for-go/
Apache License 2.0
8.62k stars 2.07k forks source link

Add default credential scope service for SageMaker Runtime #2244

Closed dideler closed 5 years ago

dideler commented 5 years ago

Signed requests to runtime.sagemaker should use the service name "sagemaker" in the Credential value of the Authorization header, instead of "runtime.sagemaker".

Similar to "lex.runtime" and "lex".

Expected diff in models/endpoints/endpoints.json

      "runtime.sagemaker" : {
+       "defaults" : {
+         "credentialScope" : {
+           "service" : "sagemaker"
+         }
+       },
        "endpoints" : {

I came across this issue when using the Elixir library ex_aws for communicating with SageMaker Runtime. That project also uses an autogenerated endpoints file which I assume uses this one as its source.

jasdel commented 5 years ago

Thanks for the heads up @dideler we'll forward this upstream to the SageMaker team.

In addition, the Metadata.SigningName field within the api-2.json file your client is generated/defined from also provides the signing name (aka CredentialScope) a client should use if that name is not provided via the standalone enpoints.json file.

jasdel commented 5 years ago

I've forward this issue to the SageMaker team. Closing this issue since the AWS SDK for Go is using the service model's Metadata.signingName field it will correctly make the API requests to the service.

the Elixir library should also be updated to use the Metadata.signingName field to avoid this issue in the future for other services.

jasdel commented 5 years ago

Looks like this issue was never closed when it should of been. Closing.